-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
- Loading branch information
Showing
14 changed files
with
99 additions
and
63 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
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 |
---|---|---|
@@ -1,10 +1,34 @@ | ||
""" | ||
Dummy conftest.py for validate_pyproject. | ||
conftest.py for validate_pyproject. | ||
If you don't know what this is for, just leave it empty. | ||
Read more about conftest.py under: | ||
- https://docs.pytest.org/en/stable/fixture.html | ||
- https://docs.pytest.org/en/stable/writing_plugins.html | ||
""" | ||
|
||
# import pytest | ||
from pathlib import Path | ||
from typing import List | ||
|
||
import pytest | ||
|
||
HERE = Path(__file__).parent.resolve() | ||
EXAMPLES = HERE / "examples" | ||
INVALID = HERE / "invalid-examples" | ||
|
||
|
||
def examples() -> List[str]: | ||
return [str(f.relative_to(EXAMPLES)) for f in EXAMPLES.glob("**/*.toml")] | ||
|
||
|
||
def invalid_examples() -> List[str]: | ||
return [str(f.relative_to(INVALID)) for f in INVALID.glob("**/*.toml")] | ||
|
||
|
||
@pytest.fixture(params=examples()) | ||
def example(request) -> Path: | ||
return EXAMPLES / request.param | ||
|
||
|
||
@pytest.fixture(params=invalid_examples()) | ||
def invalid_example(request) -> Path: | ||
return INVALID / request.param |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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