mardi 3 juillet 2018

Run django test parallel with in memory sqlite3

Is it possible to run django test cases in parallel with in memory sqlite3 with new database for each test case?

Docs says: "--parallel" Runs tests in separate parallel processes. Each process gets its own database.

DATABASES['default'] = {'ENGINE': 'django.db.backends.sqlite3'}

When I run my test in single process, all goes well.

python.exe manage.py test order --settings=gbook.settings_test

When i use --parallel param, DiscoverRunner.setup_databases called only one time.

python.exe manage.py test --settings=gbook.settings_test --parallel=4

Please, help me to understand, what am i doing wrong.

multiprocessing.cpu_count() = 4

Django version 1.11.10

Python 3.6.5

Aucun commentaire:

Enregistrer un commentaire