1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 15:39:43 +00:00
This commit is contained in:
deadc0de6
2019-06-15 21:10:33 +02:00
parent 398afb3ddc
commit 5c6db63aa7
2 changed files with 7 additions and 1 deletions

View File

@@ -44,7 +44,8 @@ class Templategen:
comment_end_string=COMMENT_END)
# adding variables
self.env.globals['env'] = os.environ
self.env.globals.update(variables)
if variables:
self.env.globals.update(variables)
# adding header method
self.env.globals['header'] = self._header
# adding helper methods

View File

@@ -46,6 +46,11 @@ class TestCompare(unittest.TestCase):
results[path] = diff == ''
return results
def test_none(self):
t = Templategen(base=self.CONFIG_DOTPATH,
debug=True, variables=None)
self.assertTrue(t is not None)
def test_compare(self):
"""Test the compare function"""
# setup some directories