From 10d6950d9cd4c1fcc4b913c768a51f3a53bbac21 Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Fri, 24 Apr 2020 10:35:13 +0200 Subject: skip scripts test if can't locate directory May happen on CI and when running tests via "python -m psutil.tests" since scripts dir is not installed. --- psutil/tests/test_misc.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/psutil/tests/test_misc.py b/psutil/tests/test_misc.py index ca0a0433..74a0c427 100755 --- a/psutil/tests/test_misc.py +++ b/psutil/tests/test_misc.py @@ -42,7 +42,6 @@ from psutil.tests import reload_module from psutil.tests import ROOT_DIR from psutil.tests import SCRIPTS_DIR from psutil.tests import sh -from psutil.tests import TOX from psutil.tests import TRAVIS from psutil.tests import unittest import psutil @@ -624,9 +623,7 @@ class TestWrapNumbers(unittest.TestCase): # =================================================================== -@unittest.skipIf(TOX, "can't test on TOX") -# See: https://travis-ci.org/giampaolo/psutil/jobs/295224806 -@unittest.skipIf(TRAVIS and not os.path.exists(SCRIPTS_DIR), +@unittest.skipIf(not os.path.exists(SCRIPTS_DIR), "can't locate scripts directory") class TestScripts(unittest.TestCase): """Tests for scripts in the "scripts" directory.""" -- cgit v1.2.1