]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-35458: Fix test_shutil.test_disk_usage() (GH-11111)
authorVictor Stinner <vstinner@redhat.com>
Tue, 11 Dec 2018 11:05:21 +0000 (12:05 +0100)
committerGitHub <noreply@github.com>
Tue, 11 Dec 2018 11:05:21 +0000 (12:05 +0100)
commitdc525f4315cdbe84693396d3f7a65a00425743bb
treeaccd52f07dff8d0befb7d12df7e8c39ef41158de
parent8905fcc85a6fc3ac394bc89b0bbf40897e9497a6
bpo-35458: Fix test_shutil.test_disk_usage() (GH-11111)

The following test fails if a different process creates or removes
a file on the same disk partition between the two lines:

    usage = shutil.disk_usage(os.path.dirname(__file__))
    self.assertEqual(usage, shutil.disk_usage(__file__))

Only test that disk_usage() succeed on a filename, but don't check
the result. Add also tests on the fields type (must be int).
Lib/test/test_shutil.py