Skip to content

Commit

Permalink
Merge pull request #842 from vsbogd/fix-unit-test
Browse files Browse the repository at this point in the history
Fix repr unit test in Python to check escaping
  • Loading branch information
vsbogd authored Jan 30, 2025
2 parents 6dd85ed + 87ac176 commit 14d6042
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/tests/test_grounded_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ def test_higher_func(self):

def test_string_repr(self):
metta = MeTTa(env_builder=Environment.test_env())
self.assertEqual(metta.run('!(repr "A")')[0][0].get_object(), ValueObject("\"A\""))
self.assertEqual(metta.run('!(repr "A\n\tBB\x1b\u130A9")')[0][0].get_object(),
ValueObject("\"A\\n\\tBB\\x1b\u130A9\""))

def test_meta_types(self):
metta = MeTTa(env_builder=Environment.test_env())
Expand Down

0 comments on commit 14d6042

Please # to comment.