MCPcopy Index your code
hub / github.com/python/cpython / test_data

Method test_data

Lib/test/test_userstring.py:52–61  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

50 getattr(object, methodname)(*args)
51
52 def test_data(self):
53 u = UserString("spam")
54 self.assertEqual(u.data, "spam")
55 self.assertIs(type(u.data), str)
56 u = UserString(u)
57 self.assertEqual(u.data, "spam")
58 self.assertIs(type(u.data), str)
59 u = UserString(42)
60 self.assertEqual(u.data, "42")
61 self.assertIs(type(u.data), str)
62
63 def test_mixed_add(self):
64 u = UserString("spam") + "eggs"

Callers

nothing calls this directly

Calls 3

UserStringClass · 0.90
assertEqualMethod · 0.45
assertIsMethod · 0.45

Tested by

no test coverage detected