Is QuickSearchTest
a unittest.TestCase subclass? loadTestsFromTestCase will only find tests that are in a TestCase
subclass. You could have a look at the contents of all_tests
to see if it actually loaded anything from your module/class.
Assuming run()
is nosetests run, using suite
comes with a pretty hefty warning:
suite: Suite or list of tests to run (default: None). Passing a suite or lists of tests will bypass all test discovery and loading. ALSO NOTE that if you pass a unittest.TestSuite instance as the suite, context fixtures at the class, module and package level will not be used, and many plugin hooks will not be called. If you want normal nose behavior, either pass a list of tests, or a fully-configured nose.suite.ContextSuite.
You're losing a lot of nosetest utility (setup/teardown at module and class level etc.) by manually assembling and running the tests yourself.
run
accepts a list of tests for suite
, so you could try using suite= all_tests
when invoking it.
Alternatively this SO answer might help.