]> granicus.if.org Git - python/commitdiff
Make test_shutil test_disk_usage not depend on the cwd fs (#2597)
authorGregory P. Smith <greg@krypto.org>
Fri, 7 Jul 2017 00:11:27 +0000 (17:11 -0700)
committerGitHub <noreply@github.com>
Fri, 7 Jul 2017 00:11:27 +0000 (17:11 -0700)
Make test_shutil test_disk_usage not depend on the current working directory's filesystem.

Lib/test/test_shutil.py

index f21e6adf4abad037d1650d9c34d69801e7c64b1d..3b4891ddcaf63c5220f4574c07c068b6d8816307 100644 (file)
@@ -1304,7 +1304,7 @@ class TestShutil(unittest.TestCase):
     @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)