From 0bf9a7a072a80e10a29c6bb3943b107352dc1d45 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Wed, 10 Jun 2020 17:22:59 -0700 Subject: [PATCH] add test for no data --- tests/test_csv.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_csv.py b/tests/test_csv.py index 94fe7ac1..6d3b2d91 100644 --- a/tests/test_csv.py +++ b/tests/test_csv.py @@ -65,6 +65,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-insurance.json'), 'r', encoding='utf-8') as f: self.generic_csv_insurance_json = json.loads(f.read()) + def test_csv_nodata(self): + """ + Test with no data + """ + self.assertEqual(jc.parsers.csv.parse('', quiet=True), []) + def test_csv_biostats(self): """ Test 'biostats.csv' file