2009/8/19 Filip Gruszczyński <[email protected]>:
>
> Still, I've got a question: if someone creates a suit through a
> function, how should it be invoked? Only explicitly
> app.module.suite_function or if run ./manage.py test should this suite
> be also invoked (and then some tests will be run twice)?

I see no reason that the existing behavior needs to change in any
significant way. At present, the test suite called "suite" is the
entry point for manage.py test. If this suite isn't defined, all
TestCases in the module will be loaded into a default suite and
executed.

The only difference with what you are proposing is that it will be
possible to invoke suites with a name other than 'suite'. Unless the
user defines a 'suite' function that composes the individual suites
into a single master suite, extra suite definitions shouldn't interact
with the existing test execution.

A summary of what I see as appropriate behaviour:

./manage.py test app
  - if defined, run suite()
  - otherwise, run all TestCases in module

./manage.py test app.MyTestCase
  - runs test case MyTestCase

./manage.py test app.MyTestCase.test_stuff
  - runs the single test_stuff test case from MyTestCase

./manage.py test app.mysuite
  - runs contents of mysuite()

./manage.py test app.suite
  - equivalent to ./manage.py test app, except that it requires the
existence of a test suite - error if no suite() function is defined.

Yours,
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to