1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-05 00:59:42 +00:00

fix tests realpath

This commit is contained in:
deadc0de6
2022-05-24 18:00:37 +02:00
committed by deadc0de
parent e4d860844a
commit 1291b4b29a
4 changed files with 8 additions and 3 deletions

View File

@@ -1073,6 +1073,9 @@ class CfgYaml:
self._yaml_dict[self.key_profiles][key] = {
self.key_profile_dotfiles: []
}
self.profiles[key] = {
self.key_profile_dotfiles: []
}
if self._debug:
self._dbg('adding new profile: {}'.format(key))
self._dirty = True

View File

@@ -160,7 +160,7 @@ def load_options(confpath, profile):
o = Options(args=args)
o.profile = profile
o.dry = False
o.safe = True
o.safe = False
o.install_diff = True
o.import_link = LinkTypes.NOLINK
o.install_showdiff = True

View File

@@ -356,7 +356,7 @@ exec bspwm
# Ensure all destination files point to source
for src in srcs:
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):
"""test fails without src"""

View File

@@ -114,7 +114,9 @@ class TestUpdate(unittest.TestCase):
src = os.path.join(o.dotpath, dotfile.src)
src = os.path.expanduser(src)
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
d1indotpath = os.path.join(o.dotpath, dotfile.src)
d1indotpath = os.path.expanduser(d1indotpath)