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

Method test_scope_preserved

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

Source from the content-addressed store, hash-verified

89 self.assertRaises(TypeError, hash, Code("hello world"))
90
91 def test_scope_preserved(self):
92 a = Code("hello")
93 b = Code("hello", {"foo": 5})
94
95 self.assertEqual(a, Code(a))
96 self.assertEqual(b, Code(b))
97 self.assertNotEqual(a, Code(b))
98 self.assertNotEqual(b, Code(a))
99
100 def test_scope_kwargs(self):
101 self.assertEqual({"a": 1}, Code("", a=1).scope)

Callers

nothing calls this directly

Calls 1

CodeClass · 0.90

Tested by

no test coverage detected