diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2015-08-04 02:41:05 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2015-08-04 02:41:05 +0200 |
commit | 2398f8b68995c26dab91d68eef11eb3c1929bfe0 (patch) | |
tree | 898b5cda8fd89041ac106ece15cf7439a2cd5965 | |
parent | 29aad0a5becffa8a141d0ce0e48492e1a39eaca6 (diff) | |
download | psutil-2398f8b68995c26dab91d68eef11eb3c1929bfe0.tar.gz |
CI fixes
-rw-r--r-- | appveyor.yml | 2 | ||||
-rw-r--r-- | test/test_psutil.py | 13 |
2 files changed, 11 insertions, 4 deletions
diff --git a/appveyor.yml b/appveyor.yml index df5d8a97..10080c79 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,7 +4,7 @@ environment: # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the # /E:ON and /V:ON options are not enabled in the batch script intepreter # See: http://stackoverflow.com/a/13751649/163740 - WITH_COMPILER: "cmd /E:ON /V:ON /C .\\.ci\appveyor\\run_with_compiler.cmd" + WITH_COMPILER: "cmd /E:ON /V:ON /C .\\.ci\\appveyor\\run_with_compiler.cmd" matrix: # Pre-installed Python versions, which Appveyor may upgrade to diff --git a/test/test_psutil.py b/test/test_psutil.py index 93f522ec..470c1cce 100644 --- a/test/test_psutil.py +++ b/test/test_psutil.py @@ -967,6 +967,8 @@ class TestSystemAPIs(unittest.TestCase): try: os.stat(disk.mountpoint) except OSError as err: + if TRAVIS and OSX and err.errno == errno.EIO: + continue # http://mail.python.org/pipermail/python-dev/ # 2012-June/120787.html if err.errno not in (errno.EPERM, errno.EACCES): @@ -1643,8 +1645,13 @@ class TestProcess(unittest.TestCase): # Test that name(), exe() and cmdline() correctly handle programs # with funky chars such as spaces and ")", see: # https://github.com/giampaolo/psutil/issues/628 - funky_path = os.path.join(tempfile.gettempdir(), "foo bar )") - _, c_file = tempfile.mkstemp(prefix='psutil-', suffix='.c', dir="/tmp") + # funky_path = os.path.join(tempfile.gettempdir(), "foo bar )") + fd, funky_path = tempfile.mkstemp( + prefix='psutil-', suffix='foo bar )', dir="/tmp") + os.close(fd) + fd, c_file = tempfile.mkstemp( + prefix='psutil-', suffix='.c', dir="/tmp") + os.close(fd) self.addCleanup(safe_remove, c_file) self.addCleanup(safe_remove, funky_path) with open(c_file, "w") as f: @@ -1658,7 +1665,7 @@ class TestProcess(unittest.TestCase): self.assertEqual(p.name(), os.path.basename(funky_path)) self.assertEqual(p.exe(), funky_path) self.assertEqual( - p.cmdline(), ["/tmp/foo bar )", "arg1", "arg2", "", "arg3", ""]) + p.cmdline(), [funky_path, "arg1", "arg2", "", "arg3", ""]) @unittest.skipUnless(POSIX, 'posix only') def test_uids(self): |