Skip to content

Commit adf3eb1

Browse files
committed
Simplify logic for android special case test.
1 parent a3d96cf commit adf3eb1

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

tests/test_common.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,10 +461,9 @@ def test_pth_handling():
461461
# causes this test to fail. For now, accept this as an XFAIL; if it
462462
# passes, fail as an indicator that the bug has been resolved, and we
463463
# can simplify the test.
464-
try:
465-
assert pth_tester.has_socket
464+
if pth_tester.has_socket:
466465
pytest.fail("Android .pth handling bug has been resolved.")
467-
except AssertionError:
466+
else:
468467
pytest.xfail(
469468
"On Android, .pth files are processed before sys.path is finalized."
470469
)

0 commit comments

Comments
 (0)