From ddb9bd1ba10c1ecfc79e67730ea55bcc5c870809 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Wed, 15 Mar 2023 02:18:01 -0400 Subject: [PATCH] tests: xfail tests until we work on them (#975) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * xfail tests until we work on them * more xfail for pypy * Apply suggestions from code review --------- Co-authored-by: Mickaƫl Schoentgen --- tests/test_0_watchmedo.py | 18 +++++++++++++++++- tests/test_emitter.py | 1 + 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/tests/test_0_watchmedo.py b/tests/test_0_watchmedo.py index b252d0e8..a38f7696 100644 --- a/tests/test_0_watchmedo.py +++ b/tests/test_0_watchmedo.py @@ -151,6 +151,10 @@ def test_auto_restart_on_file_change(tmpdir, capfd): assert trick.restart_count == 3 +@pytest.mark.xfail( + condition=sys.platform.startswith(("win", "darwin")) or sys.implementation.name == "pypy", + reason="known to be problematic, see #973", +) def test_auto_restart_on_file_change_debounce(tmpdir, capfd): """Simulate changing 3 files quickly and then another change later. @@ -173,7 +177,19 @@ def test_auto_restart_on_file_change_debounce(tmpdir, capfd): assert trick.restart_count == 2 -@pytest.mark.parametrize("restart_on_command_exit", [True, False]) +@pytest.mark.parametrize( + "restart_on_command_exit", + [ + True, + pytest.param( + False, + marks=pytest.mark.xfail( + condition=sys.platform.startswith(("win", "darwin")), + reason="known to be problematic, see #972", + ), + ), + ], +) def test_auto_restart_subprocess_termination(tmpdir, capfd, restart_on_command_exit): """Run auto-restart with a script that terminates in about 2 seconds. diff --git a/tests/test_emitter.py b/tests/test_emitter.py index 3bdf7681..1f0ffb29 100644 --- a/tests/test_emitter.py +++ b/tests/test_emitter.py @@ -133,6 +133,7 @@ def test_create(): assert isinstance(event, FileClosedEvent) +@pytest.mark.xfail(reason="known to be problematic") @pytest.mark.skipif( not platform.is_linux(), reason="FileCloseEvent only supported in GNU/Linux" )