Skip to content

Commit fc96700

Browse files
committed
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.
1 parent 85478c5 commit fc96700

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tornado/testing.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,11 @@ def wrapper(self):
377377
return wrapper
378378

379379

380+
# Without this attribute, nosetests will try to run gen_test as a test
381+
# anywhere it is imported.
382+
gen_test.__test__ = False
383+
384+
380385
class LogTrapTestCase(unittest.TestCase):
381386
"""A test case that captures and discards all logging output
382387
if the test passes.

0 commit comments

Comments
 (0)