diff options
author | Jeff Tang <mrjefftang@users.noreply.github.com> | 2015-08-04 09:57:37 -0400 |
---|---|---|
committer | Jeff Tang <mrjefftang@users.noreply.github.com> | 2015-08-04 09:57:37 -0400 |
commit | 4caf70b388a00991b478a7c407fca1128cba8c53 (patch) | |
tree | 1547a26a74eee2a02a40f5bbe18309232945e992 | |
parent | d6ed25982902d7d3865fc0bf068fff3f43620493 (diff) | |
download | psutil-4caf70b388a00991b478a7c407fca1128cba8c53.tar.gz |
Use /private/tmp for OSX
-rw-r--r-- | test/test_psutil.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/test_psutil.py b/test/test_psutil.py index 470c1cce..04a3bbf0 100644 --- a/test/test_psutil.py +++ b/test/test_psutil.py @@ -1646,11 +1646,15 @@ class TestProcess(unittest.TestCase): # with funky chars such as spaces and ")", see: # https://github.com/giampaolo/psutil/issues/628 # funky_path = os.path.join(tempfile.gettempdir(), "foo bar )") + if OSX: + tmpdir = "/private/tmp" + else: + tmpdir = "/tmp" fd, funky_path = tempfile.mkstemp( - prefix='psutil-', suffix='foo bar )', dir="/tmp") + prefix='psutil-', suffix='foo bar )', dir=tmpdir) os.close(fd) fd, c_file = tempfile.mkstemp( - prefix='psutil-', suffix='.c', dir="/tmp") + prefix='psutil-', suffix='.c', dir=tmpdir) os.close(fd) self.addCleanup(safe_remove, c_file) self.addCleanup(safe_remove, funky_path) |