mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-04 15:39:43 +00:00
fix bug #160
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user