Skip to content

Commit 5a40ef6

Browse files
committed
Don't have unnecessary branches in tests
1 parent 5e372a6 commit 5a40ef6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/trio/_core/_tests/test_instrumentation.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,12 +295,11 @@ def h(
295295
self: Instrument,
296296
*args: object,
297297
hook: str = hook,
298-
val: tuple[bool | None, bool | None] = val,
298+
val: tuple[bool, bool | None] = val,
299299
) -> None:
300300
fail_str = f"failed in {hook}"
301301

302-
if val[0] is not None:
303-
assert _core.in_trio_run() == val[0], fail_str
302+
assert _core.in_trio_run() == val[0], fail_str
304303
if val[1] is not None:
305304
assert _core.in_trio_task() == val[1], fail_str
306305
called.add(hook)

0 commit comments

Comments
 (0)