mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-04 19:09:44 +00:00
fix bug #160
This commit is contained in:
@@ -44,7 +44,8 @@ class Templategen:
|
|||||||
comment_end_string=COMMENT_END)
|
comment_end_string=COMMENT_END)
|
||||||
# adding variables
|
# adding variables
|
||||||
self.env.globals['env'] = os.environ
|
self.env.globals['env'] = os.environ
|
||||||
self.env.globals.update(variables)
|
if variables:
|
||||||
|
self.env.globals.update(variables)
|
||||||
# adding header method
|
# adding header method
|
||||||
self.env.globals['header'] = self._header
|
self.env.globals['header'] = self._header
|
||||||
# adding helper methods
|
# adding helper methods
|
||||||
|
|||||||
@@ -46,6 +46,11 @@ class TestCompare(unittest.TestCase):
|
|||||||
results[path] = diff == ''
|
results[path] = diff == ''
|
||||||
return results
|
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):
|
def test_compare(self):
|
||||||
"""Test the compare function"""
|
"""Test the compare function"""
|
||||||
# setup some directories
|
# setup some directories
|
||||||
|
|||||||
Reference in New Issue
Block a user