Mercurial > hgrepos > Python > libs > ConfigMix
diff tests/test.py @ 525:be6ef72c55d5
Change Configuration.expand_variable() to Configuration.interpolate_variables()
| author | Franz Glasner <f.glasner@feldmann-mg.com> |
|---|---|
| date | Mon, 20 Dec 2021 12:43:17 +0100 |
| parents | ad1e630ba736 |
| children | f71d34dda19f |
line wrap: on
line diff
--- a/tests/test.py Mon Dec 20 02:00:03 2021 +0100 +++ b/tests/test.py Mon Dec 20 12:43:17 2021 +0100 @@ -417,17 +417,17 @@ def test08_None_filter_single(self): cfg = self._load() - x = cfg.expand_variable("{{non-existing|None}}") + x = cfg.interpolate_variables("{{non-existing|None}}") self.assertIsNone(x) def test09_None_filter_embedded(self): cfg = self._load() - x = cfg.expand_variable("A{{non-existing|None}}Z") + x = cfg.interpolate_variables("A{{non-existing|None}}Z") self.assertEqual("AZ", x) def test10_Empty_filtersingle(self): cfg = self._load() - x = cfg.expand_variable("{{non-existing|Empty}}") + x = cfg.interpolate_variables("{{non-existing|Empty}}") self.assertEqual("", x) def test11_None_filter_pass_through(self): @@ -436,7 +436,7 @@ os.path.join(TESTDATADIR, "conf22.ini"), os.path.join(TESTDATADIR, "conf23.json"), os.path.join(TESTDATADIR, "conf24.toml")) - x = cfg.expand_variable("{{intl.cache.items|None}}") + x = cfg.interpolate_variables("{{intl.cache.items|None}}") self.assertEqual(10, x) def test12_Empty_filter_pass_through(self): @@ -445,7 +445,7 @@ os.path.join(TESTDATADIR, "conf22.ini"), os.path.join(TESTDATADIR, "conf23.json"), os.path.join(TESTDATADIR, "conf24.toml")) - x = cfg.expand_variable("{{intl.cache.items|Empty}}") + x = cfg.interpolate_variables("{{intl.cache.items|Empty}}") self.assertEqual(10, x) def test13_keyerror(self):
