MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / test_repr

Method test_repr

test/test_code.py:62–70  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

60 Code("héllø world¡")
61
62 def test_repr(self):
63 c = Code("hello world", {})
64 self.assertEqual(repr(c), "Code('hello world', {})")
65 c.scope["foo"] = "bar"
66 self.assertEqual(repr(c), "Code('hello world', {'foo': 'bar'})")
67 c = Code("hello world", {"blah": 3})
68 self.assertEqual(repr(c), "Code('hello world', {'blah': 3})")
69 c = Code("\x08\xFF")
70 self.assertEqual(repr(c), "Code({}, None)".format(repr("\x08\xFF")))
71
72 def test_equality(self):
73 b = Code("hello")

Callers

nothing calls this directly

Calls 1

CodeClass · 0.90

Tested by

no test coverage detected