Mercurial > hgrepos > Python > libs > ConfigMix
changeset 737:282c8e64d7b1
FIX: tests on non-Windows
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sun, 29 Oct 2023 11:32:56 +0100 |
| parents | 324ae9a56a75 |
| children | 20e3c2d956d9 |
| files | tests/test.py |
| diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test.py Sun Oct 29 10:17:22 2023 +0100 +++ b/tests/test.py Sun Oct 29 11:32:56 2023 +0100 @@ -2451,25 +2451,27 @@ self.assertEqual(u("PRE_VALUE FOR KEY-1_POST"), y) def test_nested_filter_normpath(self): + p1 = u(os.path.join("a", "b", "c")) cfg1 = { - u("path1"): u("a\\b\\c"), + u("path1"): p1, u("path2"): u("{{|{{path1}}/../d|normpath|}}") } cfg = cfg = configmix.config.Configuration(cfg1) np = cfg.getvarl_s(u("path2")) self.assertEqual( - os.path.normpath(u("a/b/d")), + os.path.normpath(u(os.path.join("a", "b", "d"))), np) def test_nested_filter_normpath_posixpath(self): + p1 = u(os.path.join("a", "b", "c")) cfg1 = { - u("path1"): u("a\\b\\c"), + u("path1"): p1, u("path2"): u("{{|{{path1}}/../d|normpath,posixpath|}}") } cfg = cfg = configmix.config.Configuration(cfg1) np = cfg.getvarl_s(u("path2")) self.assertEqual( - u("a/b/d"), + u(os.path.join("a", "b", "d")), np)
