]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Set the __test__ attribute on gen_test to False.
authorBen Darnell <ben@bendarnell.com>
Tue, 2 Apr 2013 04:11:10 +0000 (00:11 -0400)
committerBen Darnell <ben@bendarnell.com>
Tue, 2 Apr 2013 04:11:10 +0000 (00:11 -0400)
Without this, if a nose-using project imported gen_test nose would try
to run it as a test.

tornado/testing.py

index f92abab38af84da7467104308c9c633c52a392bf..b7d2881e91ecdec1267724cd61c2c4538b583095 100644 (file)
@@ -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.