diff --git a/psutil/tests/__init__.py b/psutil/tests/__init__.py index 2269c424f..dd3d53647 100644 --- a/psutil/tests/__init__.py +++ b/psutil/tests/__init__.py @@ -104,7 +104,7 @@ 'unittest', 'skip_on_access_denied', 'skip_on_not_implemented', 'retry_on_failure', 'TestMemoryLeak', 'PsutilTestCase', 'process_namespace', 'system_namespace', 'print_sysinfo', - 'is_win_secure_system_proc', + 'is_win_secure_system_proc', 'fake_pytest', # fs utils 'chdir', 'safe_rmpath', 'create_py_exe', 'create_c_exe', 'get_testfn', # os diff --git a/psutil/tests/test_testutils.py b/psutil/tests/test_testutils.py index fb8f5eabb..e11c8f783 100755 --- a/psutil/tests/test_testutils.py +++ b/psutil/tests/test_testutils.py @@ -26,6 +26,7 @@ from psutil._common import open_binary from psutil._common import open_text from psutil._common import supports_ipv6 +from psutil._compat import PY3 from psutil.tests import CI_TESTING from psutil.tests import COVERAGE from psutil.tests import HAS_NET_CONNECTIONS_UNIX @@ -506,12 +507,12 @@ def foo(self): assert result.wasSuccessful() assert len(result.skipped) == 0 + @pytest.mark.skipif(not PY3, reason="not PY3") def test_skip(self): class TestCase(unittest.TestCase): def foo(self): fake_pytest.skip("reason") - - assert 1 == 1 # noqa + assert 1 == 0 # noqa result = self.run_test_class(TestCase("foo")) assert result.wasSuccessful()