1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-07 12:48:32 +00:00

better provide template variables as global in templategen

This commit is contained in:
deadc0de6
2018-09-01 18:48:59 +02:00
parent 7c4ef310b1
commit 89198eddb6
4 changed files with 33 additions and 35 deletions

View File

@@ -30,14 +30,14 @@ class TestCompare(unittest.TestCase):
def compare(self, opts, conf, tmp, nbdotfiles):
dotfiles = conf.get_dotfiles(opts['profile'])
self.assertTrue(len(dotfiles) == nbdotfiles)
t = Templategen(base=opts['dotpath'], debug=True)
t = Templategen(opts['profile'], base=opts['dotpath'], debug=True)
inst = Installer(create=opts['create'], backup=opts['backup'],
dry=opts['dry'], base=opts['dotpath'], debug=True)
comp = Comparator()
results = {}
for dotfile in dotfiles:
ret, insttmp = inst.install_to_temp(t, tmp, opts['profile'],
dotfile.src, dotfile.dst)
ret, insttmp = inst.install_to_temp(t, tmp, dotfile.src,
dotfile.dst)
if not ret:
results[path] = False
continue