homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author doerwalter
Recipients benjamin.peterson, bob.ippolito, doerwalter, pitrou
Date 2009年04月08日.16:04:46
SpamBayes Score 2.0477742e-10
Marked as misclassified No
Message-id <1239206687.98.0.133036637147.issue5723@psf.upfronthosting.co.za>
In-reply-to
Content
test_quopri has a decorator that calls a test using both the C and
Python version of the tested function. This decorator looks like this:
def withpythonimplementation(testfunc):
 def newtest(self):
 # Test default implementation
 testfunc(self)
 # Test Python implementation
 if quopri.b2a_qp is not None or quopri.a2b_qp is not None:
 oldencode = quopri.b2a_qp
 olddecode = quopri.a2b_qp
 try:
 quopri.b2a_qp = None
 quopri.a2b_qp = None
 testfunc(self)
 finally:
 quopri.b2a_qp = oldencode
 quopri.a2b_qp = olddecode
 newtest.__name__ = testfunc.__name__
 return newtest
Adding such a decorator to every test method might solve the problem.
History
Date User Action Args
2009年04月08日 16:04:48doerwaltersetrecipients: + doerwalter, bob.ippolito, pitrou, benjamin.peterson
2009年04月08日 16:04:47doerwaltersetmessageid: <1239206687.98.0.133036637147.issue5723@psf.upfronthosting.co.za>
2009年04月08日 16:04:46doerwalterlinkissue5723 messages
2009年04月08日 16:04:46doerwaltercreate

AltStyle によって変換されたページ (->オリジナル) /