diff --git a/dotdrop/cfg_yaml.py b/dotdrop/cfg_yaml.py index 05b2939..44624c5 100644 --- a/dotdrop/cfg_yaml.py +++ b/dotdrop/cfg_yaml.py @@ -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 diff --git a/tests/helpers.py b/tests/helpers.py index 458514f..33efe59 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -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 diff --git a/tests/test_install.py b/tests/test_install.py index c20cd4e..6e640ed 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -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""" diff --git a/tests/test_update.py b/tests/test_update.py index 81eb98f..a9f102c 100644 --- a/tests/test_update.py +++ b/tests/test_update.py @@ -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)