summaryrefslogtreecommitdiff
path: root/psutil/tests/test_system.py
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2017-05-04 06:29:36 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2017-05-04 06:29:36 +0200
commitec42f77f5ab929e6557b44810c92313e9d0d89d6 (patch)
tree13af30b314f129347a57b0f0af76932d6caef705 /psutil/tests/test_system.py
parent8393e9c78068d0cd168251927d7952019af575db (diff)
downloadpsutil-ec42f77f5ab929e6557b44810c92313e9d0d89d6.tar.gz
fix #1051: make disk_usage() on python 3 able to deal with bytes
Diffstat (limited to 'psutil/tests/test_system.py')
-rwxr-xr-xpsutil/tests/test_system.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/psutil/tests/test_system.py b/psutil/tests/test_system.py
index 19f997a8..bb485296 100755
--- a/psutil/tests/test_system.py
+++ b/psutil/tests/test_system.py
@@ -463,11 +463,9 @@ class TestSystemAPIs(unittest.TestCase):
if ASCII_FS:
with self.assertRaises(UnicodeEncodeError):
psutil.disk_usage(TESTFN_UNICODE)
- else:
- safe_rmpath(TESTFN_UNICODE)
- self.addCleanup(safe_rmpath, TESTFN_UNICODE)
- os.mkdir(TESTFN_UNICODE)
- psutil.disk_usage(TESTFN_UNICODE)
+
+ def test_disk_usage_bytes(self):
+ psutil.disk_usage(b'.')
def test_disk_partitions(self):
# all = False