# HG changeset patch # User Franz Glasner # Date 1620377026 -7200 # Node ID 7692c91bb3705ad602d37b57464c85dd942decab # Parent 97d47c5150d6114612589032b920ca471bf84354 Tests: more thorough tests of identity and inverse quoting diff -r 97d47c5150d6 -r 7692c91bb370 tests/test.py --- a/tests/test.py Fri May 07 10:36:47 2021 +0200 +++ b/tests/test.py Fri May 07 10:43:46 2021 +0200 @@ -782,8 +782,17 @@ self._cfg.getvar_s("events.qc-2021%x2e1-5G-summit.xref.%x23")) def test_quoting_and_unquoting_are_inverse(self): - for c in """abc09'"#:|%.{}[]/""": - self.assertEqual(c, self._cfg.unquote(self._cfg.quote(c))) + for c in """%.:#|"'{}[]""": + qc = self._cfg.quote(c) + self.assertTrue(qc.startswith("%x") and len(qc) == 4) + self.assertEqual(c, self._cfg.unquote(qc)) + + def test_quoting_and_unquoting_are_identical(self): + # other characters + for c in """abc09/""": + qc = self._cfg.quote(c) + self.assertEqual(c, qc) + self.assertEqual(c, self._cfg.unquote(qc)) def test_namespace_quoting(self): v1 = self._cfg.getvar("PY:version")