From: Ben Darnell Date: Tue, 2 Apr 2013 04:11:10 +0000 (-0400) Subject: Set the __test__ attribute on gen_test to False. X-Git-Tag: v3.0.1~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc967002989971889bc269be1c811aa815811dc5;p=thirdparty%2Ftornado.git Set the __test__ attribute on gen_test to False. Without this, if a nose-using project imported gen_test nose would try to run it as a test. --- diff --git a/tornado/testing.py b/tornado/testing.py index f92abab38..b7d2881e9 100644 --- a/tornado/testing.py +++ b/tornado/testing.py @@ -377,6 +377,11 @@ def gen_test(f): return wrapper +# Without this attribute, nosetests will try to run gen_test as a test +# anywhere it is imported. +gen_test.__test__ = False + + class LogTrapTestCase(unittest.TestCase): """A test case that captures and discards all logging output if the test passes.