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

Method enterClassContext

Lib/unittest/case.py:488–490  ·  view source on GitHub ↗

Same as enterContext, but class-wide.

(cls, cm)

Source from the content-addressed store, hash-verified

486
487 @classmethod
488 def enterClassContext(cls, cm):
489 """Same as enterContext, but class-wide."""
490 return _enter_context(cm, cls.addClassCleanup)
491
492 def setUp(self):
493 "Hook method for setting up the test fixture before exercising it."

Callers 5

setUpClassMethod · 0.80
setUpClassMethod · 0.80
new_setUpClassFunction · 0.80

Calls 1

_enter_contextFunction · 0.85

Tested by 4

setUpClassMethod · 0.64
setUpClassMethod · 0.64