Skip to content

Commit ec579a2

Browse files
authored
Merge pull request #57 from pytest-dev/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents 9bde81c + 82d8292 commit ec579a2

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/psf/black
3-
rev: 23.12.1
3+
rev: 24.1.1
44
hooks:
55
- id: black
66
args: [--safe, --quiet]

tests/test_reportlog.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212

1313

1414
class OpenerModule(Protocol):
15-
def open(self, path: Path, mode: Literal["rt"]) -> TextIO:
16-
...
15+
def open(self, path: Path, mode: Literal["rt"]) -> TextIO: ...
1716

1817

1918
@pytest.mark.parametrize(
@@ -62,7 +61,11 @@ def test_warning():
6261
result.stdout.fnmatch_lines([f"* generated report log file: {log_file}*"])
6362

6463
json_objs = [json.loads(x) for x in log_file.read_text().splitlines()]
65-
assert len(json_objs) == 14
64+
if pytest.version_tuple[0] < 8:
65+
assert len(json_objs) == 14
66+
else:
67+
# In pytest 8 it produces an extra CollectReport for the extra pytest.Directory being collected.
68+
assert len(json_objs) == 15
6669

6770
# first line should be the session_start
6871
session_start = json_objs[0]

0 commit comments

Comments
 (0)