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

Function newtest

Lib/test/test_quopri.py:48–61  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

46
47def withpythonimplementation(testfunc):
48 def newtest(self):
49 # Test default implementation
50 testfunc(self)
51 # Test Python implementation
52 if quopri.b2a_qp is not None or quopri.a2b_qp is not None:
53 oldencode = quopri.b2a_qp
54 olddecode = quopri.a2b_qp
55 try:
56 quopri.b2a_qp = None
57 quopri.a2b_qp = None
58 testfunc(self)
59 finally:
60 quopri.b2a_qp = oldencode
61 quopri.a2b_qp = olddecode
62 newtest.__name__ = testfunc.__name__
63 return newtest
64

Callers

nothing calls this directly

Calls 1

testfuncFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…