comparison tests/test.py @ 334:a04cd5dbcd2c

By default quote also the characters "{", "}", "[" and "]" because they are special in YAML
author Franz Glasner <f.glasner@feldmann-mg.com>
date Fri, 07 May 2021 10:35:21 +0200
parents 5c2c72d26b63
children 97d47c5150d6
comparison
equal deleted inserted replaced
333:5ec0ae3bb8db 334:a04cd5dbcd2c
780 self.assertEqual( 780 self.assertEqual(
781 "value", 781 "value",
782 self._cfg.getvar_s("events.qc-2021%x2e1-5G-summit.xref.%x23")) 782 self._cfg.getvar_s("events.qc-2021%x2e1-5G-summit.xref.%x23"))
783 783
784 def test_quoting_and_unquoting_are_inverse(self): 784 def test_quoting_and_unquoting_are_inverse(self):
785 for c in """abc09'"#:|%./""": 785 for c in """abc09'"#:|%.{}[]/""":
786 print c
786 self.assertEqual(c, self._cfg.unquote(self._cfg.quote(c))) 787 self.assertEqual(c, self._cfg.unquote(self._cfg.quote(c)))
787 788
788 def test_namespace_quoting(self): 789 def test_namespace_quoting(self):
789 v1 = self._cfg.getvar("PY:version") 790 v1 = self._cfg.getvar("PY:version")
790 v2 = self._cfg.getvar("P%x59:version") 791 v2 = self._cfg.getvar("P%x59:version")