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

Method find_const

Lib/test/test_code.py:1185–1190  ·  view source on GitHub ↗
(self, consts, value)

Source from the content-addressed store, hash-verified

1183class CodeConstsTest(unittest.TestCase):
1184
1185 def find_const(self, consts, value):
1186 for v in consts:
1187 if v == value:
1188 return v
1189 self.assertIn(value, consts) # raises an exception
1190 self.fail('Should never be reached')
1191
1192 def assertIsInterned(self, s):
1193 if not isinterned(s):

Calls 2

assertInMethod · 0.80
failMethod · 0.45

Tested by

no test coverage detected