Mercurial > hgrepos > Python > libs > ConfigMix
changeset 458:a68240971d3d
Tests: test for iterating the keys of a configuration
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Wed, 15 Dec 2021 01:01:07 +0100 |
| parents | e3ae8092eaf3 |
| children | 9dc9cef1b9cd |
| files | tests/test.py |
| diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test.py Wed Dec 15 00:51:10 2021 +0100 +++ b/tests/test.py Wed Dec 15 01:01:07 2021 +0100 @@ -811,6 +811,15 @@ 0x1, cfg.get((u"no", u"key"), default=0x1)) + def test44_iterator(self): + cfg = self._load(os.path.join(TESTDATADIR, "conf10.py")) + s = [] + for k in cfg: + s.append(k) + s.sort() + + self.assertEqual([u"key1", u"key2", u"tree1"], s) + class T02LoadAndMerge(_T02MixinLoadAndMerge, unittest.TestCase):
