Browse Source

Fix diskusage test coverage

tags/nilmdb-2.0.0
Jim Paris 2 years ago
parent
commit
d8294469cf
2 changed files with 2 additions and 1 deletions
  1. +1
    -1
      nilmdb/utils/diskusage.py
  2. +1
    -0
      tests/test_misc.py

+ 1
- 1
nilmdb/utils/diskusage.py View File

@@ -28,6 +28,6 @@ def du(path):
size += du(filepath)
return size
except OSError as e:
if e.errno != errno.ENOENT: # pragma: no cover
if e.errno != errno.ENOENT:
raise
return 0

+ 1
- 0
tests/test_misc.py View File

@@ -93,3 +93,4 @@ class TestMisc(object):
nilmdb.utils.diskusage.du("/dev")
with assert_raises(OSError):
nilmdb.utils.diskusage.du("/dev/null/bogus")
nilmdb.utils.diskusage.du("super-bogus-does-not-exist")

Loading…
Cancel
Save