Skip to content

Commit 529746c

Browse files
authored
Make test_shutil test_disk_usage not depend on the cwd fs (#2597)
Make test_shutil test_disk_usage not depend on the current working directory's filesystem.
1 parent be5ebe5 commit 529746c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_shutil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,7 @@ def _boo(filename, extract_dir, extra):
13041304
@unittest.skipUnless(hasattr(shutil, 'disk_usage'),
13051305
"disk_usage not available on this platform")
13061306
def test_disk_usage(self):
1307-
usage = shutil.disk_usage(os.getcwd())
1307+
usage = shutil.disk_usage(os.path.dirname(__file__))
13081308
self.assertGreater(usage.total, 0)
13091309
self.assertGreater(usage.used, 0)
13101310
self.assertGreaterEqual(usage.free, 0)

0 commit comments

Comments
 (0)