From 9b29d0c2688eda2e4707aeba693ed14fa433a706 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Wed, 10 Jun 2020 17:32:39 -0700 Subject: [PATCH] add test for no data --- tests/test_du.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_du.py b/tests/test_du.py index 907c3f55..b10b21e0 100644 --- a/tests/test_du.py +++ b/tests/test_du.py @@ -35,6 +35,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/du.json'), 'r', encoding='utf-8') as f: self.osx_10_14_6_du_json = json.loads(f.read()) + def test_du_nodata(self): + """ + Test 'du' with no data + """ + self.assertEqual(jc.parsers.du.parse('', quiet=True), []) + def test_du_centos_7_7(self): """ Test 'du' on Centos 7.7