1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 22:04:44 +00:00
This commit is contained in:
deadc0de6
2019-05-31 19:25:48 +02:00
parent 05072f2f38
commit a90fc32c15
4 changed files with 12 additions and 9 deletions

View File

@@ -144,6 +144,7 @@ def load_options(confpath, profile):
args = _fake_args()
args['--cfg'] = confpath
args['--profile'] = profile
args['--debug'] = True
# and get the options
o = Options(args=args)
o.profile = profile

View File

@@ -29,7 +29,7 @@ class TestCompare(unittest.TestCase):
def compare(self, o, tmp, nbdotfiles):
dotfiles = o.dotfiles
self.assertTrue(len(dotfiles) == nbdotfiles)
t = Templategen(base=o.dotpath, debug=o.debug)
t = Templategen(base=o.dotpath, debug=True)
inst = Installer(create=o.create, backup=o.backup,
dry=o.dry, base=o.dotpath, debug=o.debug)
comp = Comparator()
@@ -109,6 +109,7 @@ class TestCompare(unittest.TestCase):
self.assertTrue(os.path.exists(confpath))
o = load_options(confpath, profile)
o.longkey = True
o.debug = True
dfiles = [d1, d2, d3, d4, d5, d9]
# import the files

View File

@@ -178,7 +178,7 @@ exec bspwm
dotfiles = [d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, ddot]
self.fake_config(confpath, dotfiles,
profile, tmp, [act1], [tr])
conf = Cfg(confpath, profile)
conf = Cfg(confpath, profile, debug=True)
self.assertTrue(conf is not None)
# install them

View File

@@ -38,7 +38,7 @@ class TestConfig(SubsetTestCase):
dotpath=self.CONFIG_DOTPATH,
backup=self.CONFIG_BACKUP,
create=self.CONFIG_CREATE)
conf = Cfg(confpath)
conf = Cfg(confpath, debug=True)
self.assertTrue(conf is not None)
opts = conf.settings
@@ -93,6 +93,7 @@ profiles:
args['--profile'] = 'p1'
args['--cfg'] = 'mocked'
args['--link'] = cliargs
args['--verbose'] = True
o = Options(args=args)
self.assertTrue(o.import_link == expected)
@@ -165,7 +166,7 @@ profiles:
indent=2)
# do the tests
conf = Cfg(confpath)
conf = Cfg(confpath, debug=True)
self.assertTrue(conf is not None)
# test profile
@@ -196,7 +197,7 @@ profiles:
indent=2)
# do the tests
conf = Cfg(confpath)
conf = Cfg(confpath, debug=True)
self.assertTrue(conf is not None)
def test_import_configs_merge(self):
@@ -350,8 +351,8 @@ profiles:
})
# do the tests
importing_cfg = Cfg(importing_path)
imported_cfg = Cfg(imported_path)
importing_cfg = Cfg(importing_path, debug=True)
imported_cfg = Cfg(imported_path, debug=True)
self.assertIsNotNone(importing_cfg)
self.assertIsNotNone(imported_cfg)
@@ -555,8 +556,8 @@ profiles:
})
# do the tests
importing_cfg = Cfg(importing_path)
imported_cfg = Cfg(imported_path)
importing_cfg = Cfg(importing_path, debug=True)
imported_cfg = Cfg(imported_path, debug=True)
self.assertIsNotNone(importing_cfg)
self.assertIsNotNone(imported_cfg)