MCPcopy Index your code
hub / github.com/datacamp/pythonwhat / assert_is

Method assert_is

pythonwhat/State.py:205–211  ·  view source on GitHub ↗
(self, klasses, fun, prev_fun)

Source from the content-addressed store, hash-verified

203 return self.creator and self.creator.get("type") == type
204
205 def assert_is(self, klasses, fun, prev_fun):
206 if self.__class__.__name__ not in klasses:
207 with debugger(self):
208 self.report(
209 "`%s()` can only be called on %s."
210 % (fun, " or ".join(["`%s()`" % pf for pf in prev_fun]))
211 )
212
213 def assert_is_not(self, klasses, fun, prev_fun):
214 if self.__class__.__name__ in klasses:

Callers 3

check_callFunction · 0.80
is_instanceFunction · 0.80
check_keysFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected