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

Method assertHaskey

Lib/test/test_pyclbr.py:58–63  ·  view source on GitHub ↗

succeed iff key in obj or key in ignore.

(self, obj, key, ignore)

Source from the content-addressed store, hash-verified

56 self.fail("%r missing" % missing.pop())
57
58 def assertHaskey(self, obj, key, ignore):
59 ''' succeed iff key in obj or key in ignore. '''
60 if key in ignore: return
61 if key not in obj:
62 print("***",key, file=sys.stderr)
63 self.assertIn(key, obj)
64
65 def assertEqualsOrIgnored(self, a, b, ignore):
66 ''' succeed iff a == b or a in ignore or b in ignore '''

Callers 1

checkModuleMethod · 0.95

Calls 1

assertInMethod · 0.80

Tested by

no test coverage detected