Skip to content

Commit bc6a72e

Browse files
committed
Add noqas for unit tests
1 parent ba2bd23 commit bc6a72e

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/trio/_tests/test_path.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ async def test_classmethods() -> None:
254254
assert isinstance(await trio.Path.home(), trio.Path)
255255

256256
# pathlib.Path has only two classmethods
257-
assert str(await trio.Path.home()) == os.path.expanduser("~")
257+
assert str(await trio.Path.home()) == os.path.expanduser("~") # noqa: ASYNC240
258258
assert str(await trio.Path.cwd()) == os.getcwd()
259259

260260
# Wrapped method has docstring

src/trio/_tests/test_subprocess.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -714,17 +714,17 @@ async def test_run_process_background_fail() -> None:
714714
async def test_for_leaking_fds() -> None:
715715
gc.collect() # address possible flakiness on PyPy
716716

717-
starting_fds = set(SyncPath("/dev/fd").iterdir())
717+
starting_fds = set(SyncPath("/dev/fd").iterdir()) # noqa: ASYNC240
718718
await run_process(EXIT_TRUE)
719-
assert set(SyncPath("/dev/fd").iterdir()) == starting_fds
719+
assert set(SyncPath("/dev/fd").iterdir()) == starting_fds # noqa: ASYNC240
720720

721721
with pytest.raises(subprocess.CalledProcessError):
722722
await run_process(EXIT_FALSE)
723-
assert set(SyncPath("/dev/fd").iterdir()) == starting_fds
723+
assert set(SyncPath("/dev/fd").iterdir()) == starting_fds # noqa: ASYNC240
724724

725725
with pytest.raises(PermissionError):
726726
await run_process(["/dev/fd/0"])
727-
assert set(SyncPath("/dev/fd").iterdir()) == starting_fds
727+
assert set(SyncPath("/dev/fd").iterdir()) == starting_fds # noqa: ASYNC240
728728

729729

730730
async def test_run_process_internal_error(monkeypatch: pytest.MonkeyPatch) -> None:

0 commit comments

Comments
 (0)