Skip to content

Commit

Permalink
compat fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
  • Loading branch information
jkowalleck committed Sep 16, 2023
1 parent 4d9ca25 commit 46adcef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ jobs:
- # test with the latest dependencies
os: ubuntu-latest
python-version: '3.11'
toxenv-factors: 'current'
toxenv-factors: '-current'
- # test with the lowest dependencies
os: ubuntu-latest
python-version: '3.7'
toxenv-factors: 'lowest'
toxenv-factors: '-lowest'
steps:
- name: Checkout
# see https://github.com/actions/checkout
Expand Down
10 changes: 5 additions & 5 deletions tests/test_validation_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
def _dp(prefix: str) -> Generator:
return (
(sv, tf) for sv in SchemaVersion if sv not in UNSUPPORTED_SCHEMA_VERSIONS
for tf in iglob(f'{prefix}-*.json', root_dir=join(RELEVANT_TESTDATA_DIRECTORY, sv.to_version()))
for tf in iglob(join(RELEVANT_TESTDATA_DIRECTORY, sv.to_version(), f'{prefix}-*.json'))
)


Expand All @@ -54,7 +54,7 @@ def test_throws_with_unsupported_schema_version(self, schema_version: SchemaVers
@unpack
def test_validate_no_none(self, schema_version: SchemaVersion, test_data_file: str) -> None:
validator = JsonValidator(schema_version)
with open(join(RELEVANT_TESTDATA_DIRECTORY, schema_version.to_version(), test_data_file), 'r') as tdfh:
with open(join(test_data_file), 'r') as tdfh:
test_data = tdfh.read()
try:
validation_error = validator.validate_str(test_data)
Expand All @@ -66,7 +66,7 @@ def test_validate_no_none(self, schema_version: SchemaVersion, test_data_file: s
@unpack
def test_validate_expected_error(self, schema_version: SchemaVersion, test_data_file: str) -> None:
validator = JsonValidator(schema_version)
with open(join(RELEVANT_TESTDATA_DIRECTORY, schema_version.to_version(), test_data_file), 'r') as tdfh:
with open(join(test_data_file), 'r') as tdfh:
test_data = tdfh.read()
try:
validation_error = validator.validate_str(test_data)
Expand All @@ -88,7 +88,7 @@ def test_throws_with_unsupported_schema_version(self, schema_version: SchemaVers
@unpack
def test_validate_no_none(self, schema_version: SchemaVersion, test_data_file: str) -> None:
validator = JsonStrictValidator(schema_version)
with open(join(RELEVANT_TESTDATA_DIRECTORY, schema_version.to_version(), test_data_file), 'r') as tdfh:
with open(join(test_data_file), 'r') as tdfh:
test_data = tdfh.read()
try:
validation_error = validator.validate_str(test_data)
Expand All @@ -100,7 +100,7 @@ def test_validate_no_none(self, schema_version: SchemaVersion, test_data_file: s
@unpack
def test_validate_expected_error(self, schema_version: SchemaVersion, test_data_file: str) -> None:
validator = JsonStrictValidator(schema_version)
with open(join(RELEVANT_TESTDATA_DIRECTORY, schema_version.to_version(), test_data_file), 'r') as tdfh:
with open(join(test_data_file), 'r') as tdfh:
test_data = tdfh.read()
try:
validation_error = validator.validate_str(test_data)
Expand Down

0 comments on commit 46adcef

Please sign in to comment.