Hi Tom,

On 05/09/2013 03:27 AM, Tom Christie wrote:
> * Will it be possible to globally configure the default file/path pattern?
>   Jannis's django-discover-runner includes support for a
> `TEST_DISCOVER_PATTERN` - is there anything similar, or just the command
> line `--patterns` option?  The use case I'm looking for is a single
> `tests` directory containing all the test modules, and I'm wondering if
> that'd be easy to support?

One of the goals here was to avoid adding more settings, so there isn't
a way to configure the pattern globally at this point. That may be
something we want to revisit, though; if you do need a different
pattern, you'll need it every time you run your tests, which basically
means you're either wrapping up "manage.py test" in a shell script or
overriding the test command with your own tweaked version. If we can
avoid the need for that by adding a setting, it might be worth it.

Your use case is very easy to support if you don't mind naming your test
files inside the tests/ directory all test_something.py. If you don't
like that, then you might need to use something like --pattern "*.py".

> * Is this work broadly compatible with `django-discover-runner`?  I'd
> really like to make use of it in third party packages, but I'm wondering
> if I'd be able to do so in a way that lets me also
> provide compatibility with older versions of Django.

I think the capabilities of the command-line interface in this patch are
a superset of the capabilities of discover-runner. It's smarter about
figuring some pythonpath things out, and better about handling multiple
test labels, but anything that works with discover-runner should work
here too.

If necessary it wouldn't be at all hard to backport this code into
discover-runner so they are exactly the same; I haven't discussed this
with Jannis yet.

Carl

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


Reply via email to