mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-13 00:30:17 +00:00
fix tests realpath
This commit is contained in:
@@ -1073,6 +1073,9 @@ class CfgYaml:
|
|||||||
self._yaml_dict[self.key_profiles][key] = {
|
self._yaml_dict[self.key_profiles][key] = {
|
||||||
self.key_profile_dotfiles: []
|
self.key_profile_dotfiles: []
|
||||||
}
|
}
|
||||||
|
self.profiles[key] = {
|
||||||
|
self.key_profile_dotfiles: []
|
||||||
|
}
|
||||||
if self._debug:
|
if self._debug:
|
||||||
self._dbg('adding new profile: {}'.format(key))
|
self._dbg('adding new profile: {}'.format(key))
|
||||||
self._dirty = True
|
self._dirty = True
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ def load_options(confpath, profile):
|
|||||||
o = Options(args=args)
|
o = Options(args=args)
|
||||||
o.profile = profile
|
o.profile = profile
|
||||||
o.dry = False
|
o.dry = False
|
||||||
o.safe = True
|
o.safe = False
|
||||||
o.install_diff = True
|
o.install_diff = True
|
||||||
o.import_link = LinkTypes.NOLINK
|
o.import_link = LinkTypes.NOLINK
|
||||||
o.install_showdiff = True
|
o.install_showdiff = True
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ exec bspwm
|
|||||||
# Ensure all destination files point to source
|
# Ensure all destination files point to source
|
||||||
for src in srcs:
|
for src in srcs:
|
||||||
dst = os.path.join(dst_dir, src)
|
dst = os.path.join(dst_dir, src)
|
||||||
self.assertEqual(os.path.realpath(dst), src)
|
self.assertEqual(os.path.realpath(dst), os.path.realpath(src))
|
||||||
|
|
||||||
def test_fails_without_src(self):
|
def test_fails_without_src(self):
|
||||||
"""test fails without src"""
|
"""test fails without src"""
|
||||||
|
|||||||
@@ -114,7 +114,9 @@ class TestUpdate(unittest.TestCase):
|
|||||||
src = os.path.join(o.dotpath, dotfile.src)
|
src = os.path.join(o.dotpath, dotfile.src)
|
||||||
src = os.path.expanduser(src)
|
src = os.path.expanduser(src)
|
||||||
edit_content(src, '{{@@ profile @@}}')
|
edit_content(src, '{{@@ profile @@}}')
|
||||||
if os.path.basename(dotfile.dst) == dirsubs:
|
left = os.path.realpath(os.path.basename(dotfile.dst))
|
||||||
|
right = os.path.realpath(dirsubs)
|
||||||
|
if left == right:
|
||||||
# retrieve the path of the sub in the dotpath
|
# retrieve the path of the sub in the dotpath
|
||||||
d1indotpath = os.path.join(o.dotpath, dotfile.src)
|
d1indotpath = os.path.join(o.dotpath, dotfile.src)
|
||||||
d1indotpath = os.path.expanduser(d1indotpath)
|
d1indotpath = os.path.expanduser(d1indotpath)
|
||||||
|
|||||||
Reference in New Issue
Block a user