From df19a818d8e7091d1d3a2b8d9c31954a50665a23 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Sat, 13 Jul 2019 18:47:08 -0400 Subject: lps_gen.py: Update template_read. * lps_gen.py (template_read): Add exception handling for non-existent templates. * tests/test_lps_gen.py (TestTemplates.test_read): Add non-existent template test. --- tests/test_lps_gen.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/test_lps_gen.py') diff --git a/tests/test_lps_gen.py b/tests/test_lps_gen.py index 26c6132..c4ff1dd 100644 --- a/tests/test_lps_gen.py +++ b/tests/test_lps_gen.py @@ -113,6 +113,9 @@ class TestTemplates(object): assert type(t) is str assert len(t) > 0 + t = template_read('nonexistent.jinja2') + assert t is None + class TestLPiCal(object): """ -- cgit v1.2.3