Skip to content

Commit 8de48fe

Browse files
authored
[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 529746c)
1 parent 04864b4 commit 8de48fe

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
@@ -1294,7 +1294,7 @@ def _boo(filename, extract_dir, extra):
12941294
@unittest.skipUnless(hasattr(shutil, 'disk_usage'),
12951295
"disk_usage not available on this platform")
12961296
def test_disk_usage(self):
1297-
usage = shutil.disk_usage(os.getcwd())
1297+
usage = shutil.disk_usage(os.path.dirname(__file__))
12981298
self.assertGreater(usage.total, 0)
12991299
self.assertGreater(usage.used, 0)
13001300
self.assertGreaterEqual(usage.free, 0)

0 commit comments

Comments
 (0)