Skip to content

Commit

Permalink
fix: support pytest 8
Browse files Browse the repository at this point in the history
  • Loading branch information
noahnu committed Feb 3, 2024
1 parent 63d0f4b commit ecce0b0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
12 changes: 6 additions & 6 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ syrupy = 'syrupy'

[tool.poetry.dependencies]
python = '>=3.8.1,<4'
pytest = '>=7.0.0,<8.0.0'
pytest = '>=7.0.0,<9.0.0'

[tool.poetry.group.test.dependencies]
invoke = '^2.0.0'
Expand Down
14 changes: 9 additions & 5 deletions tests/integration/test_pytest_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@ def test_ignores_non_function_nodes(testdir):
conftest = """
import pytest
class CustomItem(pytest.Item, pytest.File):
def __init__(self, *args, fspath, parent, **kwargs):
super().__init__(fspath, parent=parent)
class CustomItem(pytest.Item):
def __init__(self, name, **kwargs):
super().__init__(name, **kwargs)
self._nodeid += "::CUSTOM"
def runtest(self):
pass
def pytest_collect_file(path, parent):
return CustomItem.from_parent(fspath=path, parent=parent)
def pytest_collect_file(file_path, parent):
return CustomItem.from_parent(
name=file_path.name,
path=file_path,
parent=parent
)
"""
testcase = """
def test_example(snapshot):
Expand Down

1 comment on commit ecce0b0

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: ecce0b0 Previous: 950997e Ratio
benchmarks/test_1000x.py::test_1000x_reads 0.7273399515751839 iter/sec (stddev: 0.06265880735213801) 0.7347531569318875 iter/sec (stddev: 0.06571901349220487) 1.01
benchmarks/test_1000x.py::test_1000x_writes 0.67562359650894 iter/sec (stddev: 0.22114318614786754) 0.645318639823697 iter/sec (stddev: 0.2275165743148998) 0.96
benchmarks/test_standard.py::test_standard 0.6935568264685107 iter/sec (stddev: 0.04391930464047193) 0.6785496231805689 iter/sec (stddev: 0.0428997086269188) 0.98

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.