mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-11 10:14:17 +00:00
coverage
This commit is contained in:
@@ -144,6 +144,7 @@ def load_options(confpath, profile):
|
|||||||
args = _fake_args()
|
args = _fake_args()
|
||||||
args['--cfg'] = confpath
|
args['--cfg'] = confpath
|
||||||
args['--profile'] = profile
|
args['--profile'] = profile
|
||||||
|
args['--debug'] = True
|
||||||
# and get the options
|
# and get the options
|
||||||
o = Options(args=args)
|
o = Options(args=args)
|
||||||
o.profile = profile
|
o.profile = profile
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class TestCompare(unittest.TestCase):
|
|||||||
def compare(self, o, tmp, nbdotfiles):
|
def compare(self, o, tmp, nbdotfiles):
|
||||||
dotfiles = o.dotfiles
|
dotfiles = o.dotfiles
|
||||||
self.assertTrue(len(dotfiles) == nbdotfiles)
|
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,
|
inst = Installer(create=o.create, backup=o.backup,
|
||||||
dry=o.dry, base=o.dotpath, debug=o.debug)
|
dry=o.dry, base=o.dotpath, debug=o.debug)
|
||||||
comp = Comparator()
|
comp = Comparator()
|
||||||
@@ -109,6 +109,7 @@ class TestCompare(unittest.TestCase):
|
|||||||
self.assertTrue(os.path.exists(confpath))
|
self.assertTrue(os.path.exists(confpath))
|
||||||
o = load_options(confpath, profile)
|
o = load_options(confpath, profile)
|
||||||
o.longkey = True
|
o.longkey = True
|
||||||
|
o.debug = True
|
||||||
dfiles = [d1, d2, d3, d4, d5, d9]
|
dfiles = [d1, d2, d3, d4, d5, d9]
|
||||||
|
|
||||||
# import the files
|
# import the files
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ exec bspwm
|
|||||||
dotfiles = [d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, ddot]
|
dotfiles = [d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, ddot]
|
||||||
self.fake_config(confpath, dotfiles,
|
self.fake_config(confpath, dotfiles,
|
||||||
profile, tmp, [act1], [tr])
|
profile, tmp, [act1], [tr])
|
||||||
conf = Cfg(confpath, profile)
|
conf = Cfg(confpath, profile, debug=True)
|
||||||
self.assertTrue(conf is not None)
|
self.assertTrue(conf is not None)
|
||||||
|
|
||||||
# install them
|
# install them
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class TestConfig(SubsetTestCase):
|
|||||||
dotpath=self.CONFIG_DOTPATH,
|
dotpath=self.CONFIG_DOTPATH,
|
||||||
backup=self.CONFIG_BACKUP,
|
backup=self.CONFIG_BACKUP,
|
||||||
create=self.CONFIG_CREATE)
|
create=self.CONFIG_CREATE)
|
||||||
conf = Cfg(confpath)
|
conf = Cfg(confpath, debug=True)
|
||||||
self.assertTrue(conf is not None)
|
self.assertTrue(conf is not None)
|
||||||
|
|
||||||
opts = conf.settings
|
opts = conf.settings
|
||||||
@@ -93,6 +93,7 @@ profiles:
|
|||||||
args['--profile'] = 'p1'
|
args['--profile'] = 'p1'
|
||||||
args['--cfg'] = 'mocked'
|
args['--cfg'] = 'mocked'
|
||||||
args['--link'] = cliargs
|
args['--link'] = cliargs
|
||||||
|
args['--verbose'] = True
|
||||||
o = Options(args=args)
|
o = Options(args=args)
|
||||||
|
|
||||||
self.assertTrue(o.import_link == expected)
|
self.assertTrue(o.import_link == expected)
|
||||||
@@ -165,7 +166,7 @@ profiles:
|
|||||||
indent=2)
|
indent=2)
|
||||||
|
|
||||||
# do the tests
|
# do the tests
|
||||||
conf = Cfg(confpath)
|
conf = Cfg(confpath, debug=True)
|
||||||
self.assertTrue(conf is not None)
|
self.assertTrue(conf is not None)
|
||||||
|
|
||||||
# test profile
|
# test profile
|
||||||
@@ -196,7 +197,7 @@ profiles:
|
|||||||
indent=2)
|
indent=2)
|
||||||
|
|
||||||
# do the tests
|
# do the tests
|
||||||
conf = Cfg(confpath)
|
conf = Cfg(confpath, debug=True)
|
||||||
self.assertTrue(conf is not None)
|
self.assertTrue(conf is not None)
|
||||||
|
|
||||||
def test_import_configs_merge(self):
|
def test_import_configs_merge(self):
|
||||||
@@ -350,8 +351,8 @@ profiles:
|
|||||||
})
|
})
|
||||||
|
|
||||||
# do the tests
|
# do the tests
|
||||||
importing_cfg = Cfg(importing_path)
|
importing_cfg = Cfg(importing_path, debug=True)
|
||||||
imported_cfg = Cfg(imported_path)
|
imported_cfg = Cfg(imported_path, debug=True)
|
||||||
self.assertIsNotNone(importing_cfg)
|
self.assertIsNotNone(importing_cfg)
|
||||||
self.assertIsNotNone(imported_cfg)
|
self.assertIsNotNone(imported_cfg)
|
||||||
|
|
||||||
@@ -555,8 +556,8 @@ profiles:
|
|||||||
})
|
})
|
||||||
|
|
||||||
# do the tests
|
# do the tests
|
||||||
importing_cfg = Cfg(importing_path)
|
importing_cfg = Cfg(importing_path, debug=True)
|
||||||
imported_cfg = Cfg(imported_path)
|
imported_cfg = Cfg(imported_path, debug=True)
|
||||||
self.assertIsNotNone(importing_cfg)
|
self.assertIsNotNone(importing_cfg)
|
||||||
self.assertIsNotNone(imported_cfg)
|
self.assertIsNotNone(imported_cfg)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user