[Python-checkins] [3.6] Make test_shutil test_disk_usage not depend on the cwd fs (GH-2597) (#2820)
Gregory P. Smith
webhook-mailer at python.org
Sun Jul 23 02:00:42 EDT 2017
https://github.com/python/cpython/commit/8de48fe04633974318d48d0abf29e552e7c742c0
commit: 8de48fe04633974318d48d0abf29e552e7c742c0
branch: 3.6
author: Gregory P. Smith <greg at krypto.org>
committer: GitHub <noreply at github.com>
date: 2017-07-22T23:00:39-07:00
summary:
[3.6] Make test_shutil test_disk_usage not depend on the cwd fs (GH-2597) (#2820)
Make test_shutil test_disk_usage not depend on the current working directory's filesystem.
(cherry picked from commit 529746c90584069270cd122920270bd7be38bca3)
files:
M Lib/test/test_shutil.py
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
index 2ad3a21c86d..b2ab1af296d 100644
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -1294,7 +1294,7 @@ def _boo(filename, extract_dir, extra):
@unittest.skipUnless(hasattr(shutil, 'disk_usage'),
"disk_usage not available on this platform")
def test_disk_usage(self):
- usage = shutil.disk_usage(os.getcwd())
+ usage = shutil.disk_usage(os.path.dirname(__file__))
self.assertGreater(usage.total, 0)
self.assertGreater(usage.used, 0)
self.assertGreaterEqual(usage.free, 0)
More information about the Python-checkins
mailing list