-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix failed tests (partially): Ignore case when letters are created by libraries #22
Conversation
@karolh2000 could you review it thought it fixes just one of failures? Another one is under investigation, and it may take some time. |
@@ -28,19 +28,21 @@ teardown() { | |||
} | |||
|
|||
@test "Testing 'pyrsia help' CLI, check if the help is shown." { | |||
# ignore case in this @test | |||
shopt -s nocasematch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably want to disable this option once the test is done otherwise it might impact other tests in this file, the best way to do it is the test tear down method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I thought so too, but it does not seem to effect other tests as I run them after changing their case. That is why I added a comment line 31.
Also bats-core is doing similar without changing the settings back in their code.
FYI ⬇️ The first one passes, and the second one fails when both are in the same file.
@test "example 1" {
shopt -s nocasematch
run echo 'aBc'
assert_output 'ABC'
}
@test "example 2" {
run echo 'aBc'
assert_output 'ABC'
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, but lets play safe in this case and turn off this option when the test is done, those kind of bugs are very difficult to debug so no reason no to do it, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay I agree. That is safer and does not confuse other maintainers. Added it. Thank you for the good feedback.
Description
This problem is found because regular executions of integration tests failed.
GitHub Actions log: https://github.com/pyrsia/pyrsia-integration-tests/actions/runs/3630701057
Note: There is another failed test that is not fixed by this PR (Investigating & asking the team).
CLI outputs changed like from
USAGE
tousage
, which is caused by Clap crate updates (Seems related to: clap-rs/clap#4123, clap-rs/clap#4155, and pyrsia/pyrsia#1343).Its codes are outside of Pyrsia and not controllable, so this PR added settings to ignore case.
After Clap update (Causing tests failure)
Before Clap update