2009/8/18 Filip Gruszczyński <[email protected]>:
>
> What I was thinking, is to provide all Test classes (both cases and
> suites) as class attributes in a modified TestSuite. When such a
> TestSuite is run using django framework, it would feed with proper
> instances, basing on those classes. This way end user would be able to
> group his tests easily - just create a TestSuite and TestCases/Suites
> it uses and all the magic would be done by us. What do you think about
> it?

I don't think I understand your proposal. An example would be
extremely helpful here. Under your proposal, what would my new
tests.py look like? How would I invoke a single test? A single test
case? A single suite?

Some guidelines that might help you shape your proposal:

 * Existing code must continue to run unmodified. This is the
cornerstone of Django's backwards compatibility guarantee.

 * The way you construct and invoke tests must not become needlessly
complicated. For example: the current test runner lets you specify
app.TestCase.test_name to run an individual test. In the presence of
suites, it makes sense that this might be extended to
app.suite_name.TestCase.test_name. However, the interface should not
_require_ the specification of a "default" suite - either in the
definition of tests, or in the name provided when executing tests. The
user should be able to continue to define just TestCases, and to
invoke them by providing just app.TestCase.

> Another aspect is: when several TestCases are first created and then
> passed to a TestSuite, should they be run twice, if user just calls
> ./manage.py test? Once as a standalone TestCase and then in a
> TestSuite?

The TestSuite is purely an organizational tool. There is no benefit to
running a TestCase twice reflecting the different ways it has been
filed.

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