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

Method test_data

Lib/test/test_userlist.py:19–33  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

17 type2test = UserList
18
19 def test_data(self):
20 u = UserList()
21 self.assertEqual(u.data, [])
22 self.assertIs(type(u.data), list)
23 a = [1, 2]
24 u = UserList(a)
25 self.assertEqual(u.data, a)
26 self.assertIsNot(u.data, a)
27 self.assertIs(type(u.data), list)
28 u = UserList(u)
29 self.assertEqual(u.data, a)
30 self.assertIs(type(u.data), list)
31 u = UserList("spam")
32 self.assertEqual(u.data, list("spam"))
33 self.assertIs(type(u.data), list)
34
35 def test_getslice(self):
36 super().test_getslice()

Callers

nothing calls this directly

Calls 5

UserListClass · 0.90
listClass · 0.85
assertIsNotMethod · 0.80
assertEqualMethod · 0.45
assertIsMethod · 0.45

Tested by

no test coverage detected