[TIP] How do you run a specific Django unittest with Tox?

Carl Meyer carl at oddbird.net
Fri Jan 1 20:32:19 PST 2016

Hi Chris,

On 12/26/2015 12:12 PM, Chris Spencer wrote:
> I'm trying to wrap Tox around some Django unittests, and I can run all
> unittests with Tox by calling:
>     django-admin.py test --settings=myapp.tests.settings myapp.tests.Tests
> However, I'd like to run a specific test at
> myapp.tests.Tests.test_somespecificthing, but I can't figure out how
> pass in a custom command-line option and use that to change the command
> Tox runs.

I think for this you need the {posargs} substitution string in your
tox.ini `commands` spec. See
for an example.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20160101/069c50e3/attachment.pgp>

More information about the testing-in-python mailing list