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

Method setUp

Lib/test/test_weakset.py:28–42  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

26class TestWeakSet(unittest.TestCase):
27
28 def setUp(self):
29 # need to keep references to them
30 self.items = [ustr(c) for c in ('a', 'b', 'c')]
31 self.items2 = [ustr(c) for c in ('x', 'y', 'z')]
32 self.ab_items = [ustr(c) for c in 'ab']
33 self.abcde_items = [ustr(c) for c in 'abcde']
34 self.def_items = [ustr(c) for c in 'def']
35 self.ab_weakset = WeakSet(self.ab_items)
36 self.abcde_weakset = WeakSet(self.abcde_items)
37 self.def_weakset = WeakSet(self.def_items)
38 self.letters = [ustr(c) for c in string.ascii_letters]
39 self.s = WeakSet(self.items)
40 self.d = dict.fromkeys(self.items)
41 self.obj = ustr('F')
42 self.fs = WeakSet([self.obj])
43
44 def test_methods(self):
45 weaksetmethods = dir(WeakSet)

Callers

nothing calls this directly

Calls 2

WeakSetClass · 0.90
fromkeysMethod · 0.45

Tested by

no test coverage detected