Skip to content

Commit

Permalink
Possible fix for depreciation warning with pytest 7
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamJamieson committed Feb 4, 2022
1 parent caafa9e commit 0817800
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pytest_asdf/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,11 @@ class AsdfSchemaFile(pytest.File):
@classmethod
def from_parent(cls, parent, *, fspath, skip_examples=False, validate_default=True,
ignore_unrecognized_tag=False, ignore_version_mismatch=False, skip_tests=[], xfail_tests=[], **kwargs):

path = pathlib.Path(fspath)

if hasattr(super(), "from_parent"):
result = super().from_parent(parent, fspath=fspath, **kwargs)
result = super().from_parent(parent, path=path, **kwargs)
else:
result = AsdfSchemaFile(fspath, parent, **kwargs)

Expand Down

0 comments on commit 0817800

Please sign in to comment.