Skip to content

Commit 2f190b1

Browse files
authored
Partially support Node.from_parent deprecation in PyTest 5.4 (#508)
1 parent 44e140a commit 2f190b1

File tree

3 files changed

+72
-64
lines changed

3 files changed

+72
-64
lines changed

Pipfile.lock

Lines changed: 65 additions & 63 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/basilisp/testrunner.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ def pytest_collect_file(parent, path):
3030
"""Primary PyTest hook to identify Basilisp test files."""
3131
if path.ext == ".lpy":
3232
if path.basename.startswith("test_") or path.purebasename.endswith("_test"):
33-
return BasilispFile(path, parent)
33+
if hasattr(BasilispFile, "from_parent"):
34+
return BasilispFile.from_parent(parent, fspath=path)
35+
else:
36+
return BasilispFile(path, parent)
3437
return None
3538

3639

tox.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ exclude_lines =
5353
if 0:
5454
if __name__ == .__main__.:
5555

56+
[pytest]
57+
junit_family = xunit2
58+
5659
[testenv:format]
5760
deps =
5861
black

0 commit comments

Comments
 (0)