lpschedule-generator

libreplanet schedule generator - ricketyspace.net/lpschedule-generator
git clone git://git.ricketyspace.net/lpschedule-generator.git
Log | Files | Refs

commit b202aa341ff1427c668985754e5f87e76aab8591
parent df19a818d8e7091d1d3a2b8d9c31954a50665a23
Author: rsiddharth <rsd@gnu.org>
Date:   Sat, 13 Jul 2019 18:54:24 -0400

lps_gen.py: Update template_read.

* lps_gen.py (template_read): Add template file extension.
* tests/test_lps_gen.py (TestTemplates.test_read): Don't specify
  template file extension.

Diffstat:
lps_gen.py | 2+-
tests/test_lps_gen.py | 6+++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lps_gen.py b/lps_gen.py @@ -97,7 +97,7 @@ def template_read(name): """Return template as `str`. """ p = 'lpschedule_generator' - r = 'data/{}'.format(name) + r = 'data/{}.jinja2'.format(name) t = None try: diff --git a/tests/test_lps_gen.py b/tests/test_lps_gen.py @@ -105,15 +105,15 @@ class TestTemplates(object): """ def test_read(self): - t = template_read('schedule.jinja2') + t = template_read('schedule') assert type(t) is str assert len(t) > 0 - t = template_read('speakers.jinja2') + t = template_read('speakers') assert type(t) is str assert len(t) > 0 - t = template_read('nonexistent.jinja2') + t = template_read('nonexistent') assert t is None