Kaydet (Commit) 2ee61884 authored tarafından Éric Araujo's avatar Éric Araujo

Clean up NEWS entry and tests for shutil.disk_usage (#12442)

üst 9d872e19
...@@ -206,7 +206,7 @@ handle NAT with non-secure FTP without opening fixed ports. ...@@ -206,7 +206,7 @@ handle NAT with non-secure FTP without opening fixed ports.
shutil shutil
------ ------
The :mod:`shutil` module has a new :func:`~shutil.disk_usage` providing total, The :mod:`shutil` module has a new :func:`~shutil.disk_usage` function providing total,
used and free disk space statistics. used and free disk space statistics.
(Contributed by Giampaolo Rodolà in :issue:`12442`) (Contributed by Giampaolo Rodolà in :issue:`12442`)
......
...@@ -732,11 +732,11 @@ class TestShutil(unittest.TestCase): ...@@ -732,11 +732,11 @@ class TestShutil(unittest.TestCase):
"disk_usage not available on this platform") "disk_usage not available on this platform")
def test_disk_usage(self): def test_disk_usage(self):
usage = shutil.disk_usage(os.getcwd()) usage = shutil.disk_usage(os.getcwd())
self.assertTrue(usage.total > 0) self.assertGreater(usage.total, 0)
self.assertTrue(usage.used > 0) self.assertGreater(usage.used, 0)
self.assertTrue(usage.free >= 0) self.assertGreaterEqual(usage.free, 0)
self.assertTrue(usage.total >= usage.used) self.assertGreaterEqual(usage.total, usage.used)
self.assertTrue(usage.total > usage.free) self.assertGreater(usage.total, usage.free)
class TestMove(unittest.TestCase): class TestMove(unittest.TestCase):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment