Skip to content

Commit 9ddb274

Browse files
committed
Update test suite to modern pytest
- Use pytest>=6.2 features (same as install_requires). When we can require >=7, can fix some more typing omissions and version checks. - Replace testdir with pytester - Replace py.test with pytest - Replace tmpdir with tmp_path - Remove (almost) all other uses of py - Add some type annotations (not checked yet) Ref #722.
1 parent 5672d85 commit 9ddb274

File tree

11 files changed

+771
-692
lines changed

11 files changed

+771
-692
lines changed

setup.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ pytest11 =
5353
[options.extras_require]
5454
testing =
5555
filelock
56-
pytest
5756
psutil = psutil>=3.0
5857
setproctitle = setproctitle
5958

src/xdist/workermanage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,9 @@ def unserialize_warning_message(data):
423423

424424
kwargs = {"message": message, "category": category}
425425
# access private _WARNING_DETAILS because the attributes vary between Python versions
426-
for attr_name in warnings.WarningMessage._WARNING_DETAILS:
426+
for attr_name in warnings.WarningMessage._WARNING_DETAILS: # type: ignore[attr-defined]
427427
if attr_name in ("message", "category"):
428428
continue
429429
kwargs[attr_name] = data[attr_name]
430430

431-
return warnings.WarningMessage(**kwargs)
431+
return warnings.WarningMessage(**kwargs) # type: ignore[arg-type]

0 commit comments

Comments
 (0)