pybee/cricket — pull request #23 by lensvol (2013-09-14 22:01:39+00:00)
Title: Runner now supports embedded test suites in build_suite() result.

There was a problem, where Django test discoverer threw an exception while trying to process TestSuites embedded in build_suite()'s output:

File "C:\Coding\Soft\Envs\kinder\Lib\site-packages\django\core\management\base.py", line 232, in execute
output = self.handle(*args, **options)
File "C:\Coding\Soft\Envs\kinder\Lib\site-packages\south\management\commands\test.py", line 8, in handle
super(Command, self).handle(*args, **kwargs)
File "C:\Coding\Soft\Envs\kinder\Lib\site-packages\django\core\management\commands\test.py", line 72, in handle
failures = test_runner.run_tests(test_labels)
File "C:\Coding\Soft\Envs\kinder\Lib\site-packages\cricket\django\discoverer.py", line 25, in run_tests
parts = test.id().split('.')
AttributeError: 'TestSuite' object has no attribute 'id'

Although you can always click "Continue" and ignore this exceptions, it hides embedded test suites from discovery and may prevent cricket from finding special test instances (e.g. doctests).

Included changeset treats build_suite() output as a trivial list of leafs and nodes, with nodes being additional test suites, which in turn can include other suites etc.