Skip to content

Commit 05977df

Browse files
committed
correct xfail condition
1 parent c0b5629 commit 05977df

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

testing/test_basic.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,21 +1141,20 @@ def test_succeed():
11411141
assert_outcomes(rr, {"passed": 1})
11421142

11431143

1144-
@pytest.mark.xfail(
1145-
condition=(
1146-
sys.platform == "win32"
1147-
or os.environ.get("REACTOR", "").startswith("qt")
1148-
),
1149-
reason="Needs handled on Windows and with qt5reactor.",
1150-
strict=True,
1151-
)
11521144
@pytest.mark.parametrize(argnames="kill", argvalues=[False, True])
11531145
@pytest.mark.parametrize(argnames="event", argvalues=["shutdown"])
11541146
@pytest.mark.parametrize(
11551147
argnames="phase",
11561148
argvalues=["before", "during", "after"],
11571149
)
11581150
def test_addSystemEventTrigger(testdir, cmd_opts, kill, event, phase):
1151+
is_win32 = sys.platform == "win32"
1152+
is_qt = os.environ.get("REACTOR", "").startswith("qt")
1153+
is_kill = kill
1154+
1155+
if (is_win32 or is_qt) and is_kill:
1156+
pytest.xfail(reason="Needs handled on Windows and with qt5reactor.")
1157+
11591158
test_string = "1kljgf90u0lkj13l4jjklsfdo89898y24hlkjalkjs38"
11601159

11611160
test_file = """

0 commit comments

Comments
 (0)