mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-15 18:30:05 +00:00
coverage
This commit is contained in:
@@ -13,7 +13,7 @@ from unittest import TestCase
|
|||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from dotdrop.options import Options, ENV_NODEBUG
|
from dotdrop.options import Options
|
||||||
from dotdrop.linktypes import LinkTypes
|
from dotdrop.linktypes import LinkTypes
|
||||||
from dotdrop.utils import strip_home
|
from dotdrop.utils import strip_home
|
||||||
|
|
||||||
@@ -144,7 +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
|
args['--verbose'] = True
|
||||||
# and get the options
|
# and get the options
|
||||||
o = Options(args=args)
|
o = Options(args=args)
|
||||||
o.profile = profile
|
o.profile = profile
|
||||||
@@ -154,8 +154,6 @@ def load_options(confpath, profile):
|
|||||||
o.import_link = LinkTypes.NOLINK
|
o.import_link = LinkTypes.NOLINK
|
||||||
o.install_showdiff = True
|
o.install_showdiff = True
|
||||||
o.debug = True
|
o.debug = True
|
||||||
if ENV_NODEBUG in os.environ:
|
|
||||||
o.debug = False
|
|
||||||
o.compare_dopts = ''
|
o.compare_dopts = ''
|
||||||
o.variables = {}
|
o.variables = {}
|
||||||
return o
|
return o
|
||||||
|
|||||||
@@ -194,6 +194,7 @@ class TestImport(unittest.TestCase):
|
|||||||
edit_content(dotfile1, editcontent)
|
edit_content(dotfile1, editcontent)
|
||||||
o.safe = False
|
o.safe = False
|
||||||
o.update_path = [dotfile1]
|
o.update_path = [dotfile1]
|
||||||
|
o.debug = True
|
||||||
cmd_update(o)
|
cmd_update(o)
|
||||||
c2 = open(indt1, 'r').read()
|
c2 = open(indt1, 'r').read()
|
||||||
self.assertTrue(editcontent == c2)
|
self.assertTrue(editcontent == c2)
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ class TestUpdate(unittest.TestCase):
|
|||||||
o = load_options(confpath, profile)
|
o = load_options(confpath, profile)
|
||||||
o.safe = False
|
o.safe = False
|
||||||
o.update_showpatch = True
|
o.update_showpatch = True
|
||||||
|
o.debug = True
|
||||||
trans = Transform('trans', 'cp -r {0} {1}')
|
trans = Transform('trans', 'cp -r {0} {1}')
|
||||||
d3tb = os.path.basename(d3t)
|
d3tb = os.path.basename(d3t)
|
||||||
for dotfile in o.dotfiles:
|
for dotfile in o.dotfiles:
|
||||||
|
|||||||
Reference in New Issue
Block a user