changeset 456:d6be95841380

Add a test for proper exception formatting when .rebind() raises a KeyError
author Franz Glasner <fzglas.hg@dom66.de>
date Wed, 15 Dec 2021 00:48:50 +0100
parents 27112bb4a5b9
children e3ae8092eaf3
files tests/test.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test.py	Wed Dec 15 00:17:27 2021 +0100
+++ b/tests/test.py	Wed Dec 15 00:48:50 2021 +0100
@@ -1279,6 +1279,8 @@
     def test_root_non_existing_raises(self):
         cfg = configmix.load(os.path.join(TESTDATADIR, "conf10.py"))
         self.assertRaises(KeyError, cfg.jailed, root=u"tree-non-existing")
+        self.assertRaises(
+            KeyError, cfg.jailed, rootpath=(u"non", u"existing", u"tree"))
 
     def test_rootpath(self):
         cfg = configmix.load(os.path.join(TESTDATADIR, "conf10.py"))