mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-09 09:58:20 -05:00
parallel tests.
This commit is contained in:
parent
6834e563a8
commit
6c308116d6
@ -64,9 +64,6 @@ def get_schema():
|
|||||||
|
|
||||||
|
|
||||||
def open_index(recreate=False):
|
def open_index(recreate=False):
|
||||||
# TODO: this is not thread safe. If 2 instances try to create the index
|
|
||||||
# at the same time, this fails. This currently prevents parallel
|
|
||||||
# tests.
|
|
||||||
try:
|
try:
|
||||||
if exists_in(settings.INDEX_DIR) and not recreate:
|
if exists_in(settings.INDEX_DIR) and not recreate:
|
||||||
return open_dir(settings.INDEX_DIR)
|
return open_dir(settings.INDEX_DIR)
|
||||||
|
@ -3,7 +3,7 @@ exclude = migrations, paperless/settings.py, .tox, */tests/*
|
|||||||
|
|
||||||
[tool:pytest]
|
[tool:pytest]
|
||||||
DJANGO_SETTINGS_MODULE=paperless.settings
|
DJANGO_SETTINGS_MODULE=paperless.settings
|
||||||
addopts = --pythonwarnings=all --cov --cov-report=html
|
addopts = --pythonwarnings=all --cov --cov-report=html -n auto
|
||||||
env =
|
env =
|
||||||
PAPERLESS_DISABLE_DBHANDLER=true
|
PAPERLESS_DISABLE_DBHANDLER=true
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user