MCPcopy Create free account
hub / github.com/python/cpython / test_not_an_index_issue15559

Method test_not_an_index_issue15559

Lib/test/test_ipaddress.py:83–88  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

81 self.factory(1.0)
82
83 def test_not_an_index_issue15559(self):
84 # Implementing __index__ makes for a very nasty interaction with the
85 # bytes constructor. Thus, we disallow implicit use as an integer
86 self.assertRaises(TypeError, operator.index, self.factory(1))
87 self.assertRaises(TypeError, hex, self.factory(1))
88 self.assertRaises(TypeError, bytes, self.factory(1))
89
90 def pickle_test(self, addr):
91 for proto in range(pickle.HIGHEST_PROTOCOL + 1):

Callers

nothing calls this directly

Calls 2

assertRaisesMethod · 0.45
factoryMethod · 0.45

Tested by

no test coverage detected