mercredi 6 juin 2018

Django : test with multiple patterns

I'm coding a class which is overriding DiscoverRunner (link).

And i've three kind of tests :

  • front tests called tests_front.py
  • back tests called tests_back.py
  • tests from different modules i'm using called tests.py

My front tests are very slow, and i'd like to have a parameter to call only tests_back.py and tests.py files.

The pattern i'm currently using:

pattern='(*back.py|tests.py)'

But this is calling any test, it looks like manage.py's pattern is not a real pattern.

Ran 0 test in 0.000s

Do you know how to solve my problem ? Thank you !

Aucun commentaire:

Enregistrer un commentaire