-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix excludes, make it support directories instead of globs * Make paths in file config relative to that files directory * Add test to ensure that paths in config file are relative to config files directory * Ensure defaults are set correctly, build relative paths correctly * Resolve exclude and path args to match them correctly, update tests * Attempt to fix Windows-specific test * Another attempt to fix Window test
- Loading branch information
1 parent
a1c0f33
commit c01a457
Showing
24 changed files
with
280 additions
and
105 deletions.
There are no files selected for viewing
This file contains 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 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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 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,12 @@ | ||
# What is this directory? | ||
|
||
This directory exists for testing purposes. It contains subdirectories that we can run Ward on. | ||
|
||
Any tests found in these directories are explicitly excluded from the main Ward suite via the | ||
`exclude` config option in `pyproject.toml`. | ||
|
||
These directories may be used in the unit testing suite, or could be used as | ||
part of the end-to-end testing process to ensure Ward runs as expected on unusual scenarios | ||
(e.g. deeply nested directory structures, unusual import patterns, etc.) | ||
|
||
It may contain multiple example test directories of different structures. |
Empty file.
6 changes: 6 additions & 0 deletions
6
tests/resources/sample_test_dirs/deeply_nested/my_tests/for_acceptance_test.py
This file contains 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,6 @@ | ||
from ward import test | ||
|
||
|
||
@test("another example test") | ||
def _(): | ||
assert True |
Empty file.
6 changes: 6 additions & 0 deletions
6
tests/resources/sample_test_dirs/deeply_nested/path/to/more_tests/another_module_of_test.py
This file contains 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,6 @@ | ||
from ward import test | ||
|
||
|
||
@test("another example test") | ||
def _(): | ||
assert True |
Empty file.
6 changes: 6 additions & 0 deletions
6
tests/resources/sample_test_dirs/deeply_nested/path/to/tests/test_another_example.py
This file contains 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,6 @@ | ||
from ward import test | ||
|
||
|
||
@test("one is equal to itself") | ||
def _(): | ||
assert 1 == 1 |
8 changes: 8 additions & 0 deletions
8
tests/resources/sample_test_dirs/deeply_nested/path/to/tests/test_example.py
This file contains 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,8 @@ | ||
# Ensure that if we import a test from another test module | ||
# that we don't run the tests in that module two times! | ||
from test_another_example import * | ||
|
||
|
||
@test("two is equal to itself") | ||
def _(): | ||
assert 2 == 2 |
2 changes: 2 additions & 0 deletions
2
tests/resources/sample_test_dirs/deeply_nested/pyproject.toml
This file contains 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,2 @@ | ||
[tool.ward] | ||
path = ["my_tests"] |
This file contains 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.