[Python-checkins] cpython: Clean up NEWS entry and tests for shutil.disk_usage (#12442)
eric.araujo
python-checkins at python.org
Sat Jul 2 16:47:40 CEST 2011
http://hg.python.org/cpython/rev/479973c6aa03
changeset: 71130:479973c6aa03
user: Éric Araujo <merwok at netwok.org>
date: Sat Jul 02 16:45:45 2011 +0200
summary:
Clean up NEWS entry and tests for shutil.disk_usage (#12442)
files:
Doc/whatsnew/3.3.rst | 2 +-
Lib/test/test_shutil.py | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst
--- a/Doc/whatsnew/3.3.rst
+++ b/Doc/whatsnew/3.3.rst
@@ -206,7 +206,7 @@
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.
(Contributed by Giampaolo Rodolà in :issue:`12442`)
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -732,11 +732,11 @@
"disk_usage not available on this platform")
def test_disk_usage(self):
usage = shutil.disk_usage(os.getcwd())
- self.assertTrue(usage.total > 0)
- self.assertTrue(usage.used > 0)
- self.assertTrue(usage.free >= 0)
- self.assertTrue(usage.total >= usage.used)
- self.assertTrue(usage.total > usage.free)
+ self.assertGreater(usage.total, 0)
+ self.assertGreater(usage.used, 0)
+ self.assertGreaterEqual(usage.free, 0)
+ self.assertGreaterEqual(usage.total, usage.used)
+ self.assertGreater(usage.total, usage.free)
class TestMove(unittest.TestCase):
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list