-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[testutil] Add proper test for the functional tests helpers #8484
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
Merged
Pierre-Sassoulas
merged 8 commits into
pylint-dev:main
from
Pierre-Sassoulas:add-tests-for-functional-update
Mar 28, 2023
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
7110505
[testutil] Add proper test for the functional tests helpers
Pierre-Sassoulas 7580c71
[functional tests] Display all violations for disorganized directories
Pierre-Sassoulas 1b827b9
[testutil] Fix the algorithm for functional test discovery
Pierre-Sassoulas a16d2bf
[testutil] Display all the crowded functional test dir at once
Pierre-Sassoulas 04637c3
[testutil] Display recursive call for crowded functional test dir
Pierre-Sassoulas b1bde72
[refactor] Separate assertion from setup in functional test's test
Pierre-Sassoulas 7effecf
[testutil] Do not count files with leading underscores
Pierre-Sassoulas 8f0de6d
[testutil] Remove unused variable from find_functional_tests
Pierre-Sassoulas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
7 changes: 7 additions & 0 deletions
7
tests/testutils/data/functional/broken_output_ok_test/exec_used.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| """This is an example for a functional test with | ||
| - an output that is broken | ||
| - the functional test itself is right | ||
|
|
||
| So it should be updated. | ||
| """ | ||
| exec('a = 42') # [exec-used] |
1 change: 1 addition & 0 deletions
1
tests/testutils/data/functional/broken_output_ok_test/exec_used.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| exec-used:UNDEFINED |
7 changes: 7 additions & 0 deletions
7
tests/testutils/data/functional/broken_output_wrong_test/exec_used.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| """This is an example for a functional test with | ||
| - an output that is broken | ||
| - the functional test itself is wrong | ||
|
|
||
| So it cannot be updated. | ||
| """ | ||
| exec('a = 42') |
1 change: 1 addition & 0 deletions
1
tests/testutils/data/functional/broken_output_wrong_test/exec_used.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| exec-used:UNDEFINED |
7 changes: 7 additions & 0 deletions
7
tests/testutils/data/functional/no_output_ok_test/exec_used.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| """This is an example for a functional test with | ||
| - an output that does not exist | ||
| - the functional test itself is right | ||
|
|
||
| So it should be created | ||
| """ | ||
| exec('a = 42') # [exec-used] |
7 changes: 7 additions & 0 deletions
7
tests/testutils/data/functional/no_output_wrong_test/exec_used.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| """This is an example for a functional test with | ||
| - an output that does not exist | ||
| - the functional test itself is wrong | ||
|
|
||
| So it cannot be created. | ||
| """ | ||
| exec('a = 42') |
7 changes: 7 additions & 0 deletions
7
tests/testutils/data/functional/ok_output_ok_test/exec_used.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| """This is an example for a functional test with | ||
| - an output that is right | ||
| - the functional test itself is right | ||
|
|
||
| Nothing should be done. | ||
| """ | ||
| exec('a = 42') # [exec-used] |
1 change: 1 addition & 0 deletions
1
tests/testutils/data/functional/ok_output_ok_test/exec_used.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| exec-used:7:0:7:14::Use of exec:UNDEFINED |
7 changes: 7 additions & 0 deletions
7
tests/testutils/data/functional/ok_output_wrong_test/exec_used.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| """This is an example for a functional test with | ||
| - an output that is right | ||
| - the functional test itself is wrong | ||
|
|
||
| Nothing should be done. | ||
| """ | ||
| exec('a = 42') |
1 change: 1 addition & 0 deletions
1
tests/testutils/data/functional/ok_output_wrong_test/exec_used.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| exec-used:7:0:7:14::Use of exec:UNDEFINED |
7 changes: 7 additions & 0 deletions
7
tests/testutils/data/functional/wrong_output_ok_test/exec_used.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| """This is an example for a functional test with | ||
| - an output that is wrong (but not broken) | ||
| - the functional test itself is right | ||
|
|
||
| So it needs to be updated. | ||
| """ | ||
| exec('a = 42') # [exec-used] |
1 change: 1 addition & 0 deletions
1
tests/testutils/data/functional/wrong_output_ok_test/exec_used.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| missing-docstring:5:0:1:1::Missing docstring in file:HIGH |
7 changes: 7 additions & 0 deletions
7
tests/testutils/data/functional/wrong_output_wrong_test/exec_used.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| """This is an example for a functional test with | ||
| - an output that is wrong (but not broken) | ||
| - the functional test itself is wrong | ||
|
|
||
| So it can't be updated. | ||
| """ | ||
| exec('a = 42') |
1 change: 1 addition & 0 deletions
1
tests/testutils/data/functional/wrong_output_wrong_test/exec_used.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| missing-docstring:5:0:1:1::Missing docstring in file:HIGH |
Empty file.
Empty file.
Empty file.
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.