MCPcopy Index your code
hub / github.com/RustPython/RustPython / find_const

Method find_const

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

Source from the content-addressed store, hash-verified

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

Calls 2

assertInMethod · 0.80
failMethod · 0.45

Tested by

no test coverage detected