From ac4688dca22334385ec2c87027f2f14f9ca93ce4 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Wed, 10 Jun 2020 17:35:40 -0700 Subject: [PATCH] add test for no data --- tests/test_file.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_file.py b/tests/test_file.py index ac80ea79..a8df77cf 100644 --- a/tests/test_file.py +++ b/tests/test_file.py @@ -35,6 +35,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/file2.json'), 'r', encoding='utf-8') as f: self.osx_10_14_6_file2_json = json.loads(f.read()) + def test_file_nodata(self): + """ + Test 'file' with no data + """ + self.assertEqual(jc.parsers.file.parse('', quiet=True), []) + def test_file_centos_7_7(self): """ Test 'file *' on Centos 7.7