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

Method assertImmutable

Lib/test/test_capi/test_set.py:19–23  ·  view source on GitHub ↗
(self, action, *args)

Source from the content-addressed store, hash-verified

17
18class BaseSetTests:
19 def assertImmutable(self, action, *args):
20 self.assertRaises(SystemError, action, frozenset(), *args)
21 self.assertRaises(SystemError, action, frozenset({1}), *args)
22 self.assertRaises(SystemError, action, frozenset_subclass(), *args)
23 self.assertRaises(SystemError, action, frozenset_subclass({1}), *args)
24
25
26class TestSetCAPI(BaseSetTests, unittest.TestCase):

Callers 5

test_addMethod · 0.80
test_discardMethod · 0.80
test_popMethod · 0.80
test_clearMethod · 0.80
test_set_updateMethod · 0.80

Calls 2

frozenset_subclassClass · 0.85
assertRaisesMethod · 0.45

Tested by

no test coverage detected