Created
April 6, 2012 19:37
-
-
Save jessejlt/2322351 to your computer and use it in GitHub Desktop.
nosetests running a single test programmatically
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ nosetests flask.testsuite.testing:TestToolsTestCase.test_environ_defaults | |
. | |
---------------------------------------------------------------------- | |
Ran 1 test in 0.014s | |
OK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from nose.loader import TestLoader | |
from nose import run | |
package_name = "flask.testsuite.testing" | |
test_name = "TestToolsTestCase.test_environ_defaults" | |
suite_1 = TestLoader().loadTestsFromName(package_name + ":" + test_name) | |
run(suite=suite_1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment