Skip to content

Commit

Permalink
test: use non-deprecated from_parent syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
noahnu committed Jul 29, 2020
1 parent b62f7f6 commit 0083c91
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_integration_pytest_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ def test_ignores_non_function_nodes(testdir):
import pytest
class CustomItem(pytest.Item, pytest.File):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def __init__(self, *args, fspath, parent, **kwargs):
super().__init__(fspath, parent=parent)
self._nodeid += "::CUSTOM"
def runtest(self):
pass
def pytest_collect_file(path, parent):
return CustomItem(path, parent)
return CustomItem.from_parent(fspath=path, parent=parent)
"""
testcase = """
def test_example(snapshot):
Expand Down

0 comments on commit 0083c91

Please sign in to comment.