Skip to content

Instantly share code, notes, and snippets.

@jessejlt
Created April 6, 2012 19:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jessejlt/2322351 to your computer and use it in GitHub Desktop.
Save jessejlt/2322351 to your computer and use it in GitHub Desktop.
nosetests running a single test programmatically
$ nosetests flask.testsuite.testing:TestToolsTestCase.test_environ_defaults
.
----------------------------------------------------------------------
Ran 1 test in 0.014s
OK
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