diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2017-11-23 16:51:55 +0100 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2017-11-23 16:51:55 +0100 |
commit | ecab2b3aa54ec5dbee9d7f7664ad4ed359048cd5 (patch) | |
tree | 098c51fcc37fe3da91529f8bbc656632030aebb7 | |
parent | c0a35fd6b5f6b2cad4b370d31d2d175db316faf8 (diff) | |
download | psutil-ecab2b3aa54ec5dbee9d7f7664ad4ed359048cd5.tar.gz |
do not test platf specific modules on wheelhouse
-rw-r--r-- | psutil/tests/__init__.py | 11 | ||||
-rwxr-xr-x | psutil/tests/test_misc.py | 3 |
2 files changed, 8 insertions, 6 deletions
diff --git a/psutil/tests/__init__.py b/psutil/tests/__init__.py index 7c58ab3c..5b4f6f37 100644 --- a/psutil/tests/__init__.py +++ b/psutil/tests/__init__.py @@ -764,11 +764,14 @@ def _setup_tests(): def get_suite(): - testmodules = [os.path.splitext(x)[0] for x in os.listdir(HERE) - if x.endswith('.py') and x.startswith('test_') and not - x.startswith('test_memory_leaks')] + testmods = [os.path.splitext(x)[0] for x in os.listdir(HERE) + if x.endswith('.py') and x.startswith('test_') and not + x.startswith('test_memory_leaks')] + if "WHEELHOUSE_UPLOADER_USERNAME" in os.environ: + testmods = [x for x in testmods if not x.endswith(( + "osx", "posix", "linux"))] suite = unittest.TestSuite() - for tm in testmodules: + for tm in testmods: # ...so that the full test paths are printed on screen tm = "psutil.tests.%s" % tm suite.addTest(unittest.defaultTestLoader.loadTestsFromName(tm)) diff --git a/psutil/tests/test_misc.py b/psutil/tests/test_misc.py index d0ec8a7d..f67c0e4c 100755 --- a/psutil/tests/test_misc.py +++ b/psutil/tests/test_misc.py @@ -646,8 +646,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(os.path.join(SCRIPTS_DIR, 'free.py')), +@unittest.skipIf(TRAVIS and not os.path.exists(SCRIPTS_DIR), "can't locate scripts directory") class TestScripts(unittest.TestCase): """Tests for scripts in the "scripts" directory.""" |