MCPcopy Create free account
hub / github.com/ipython/ipython / monkeypatch_xunit

Function monkeypatch_xunit

IPython/testing/iptest.py:84–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82# Monkeypatch Xunit to count known failures as skipped.
83# ------------------------------------------------------------------------------
84def monkeypatch_xunit():
85 try:
86 dec.knownfailureif(True)(lambda: None)()
87 except Exception as e:
88 KnownFailureTest = type(e)
89
90 def addError(self, test, err, capt=None):
91 if issubclass(err[0], KnownFailureTest):
92 err = (SkipTest,) + err[1:]
93 return self.orig_addError(test, err, capt)
94
95 Xunit.orig_addError = Xunit.addError
96 Xunit.addError = addError
97
98#-----------------------------------------------------------------------------
99# Check which dependencies are installed and greater than minimum version.

Callers 1

run_iptestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected