From 9438407ba221d754b02ced4495618fd211c8ed6a Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Thu, 6 Jul 2017 17:11:27 -0700 Subject: [PATCH] [3.6] Make test_shutil test_disk_usage not depend on the cwd fs (GH-2597) Make test_shutil test_disk_usage not depend on the current working directory's filesystem. (cherry picked from commit 529746c90584069270cd122920270bd7be38bca3) --- Lib/test/test_shutil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py index 2ad3a21c86d2c1..b2ab1af296d682 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)