mirror of
https://github.com/pretix/pretix.git
synced 2026-08-23 12:51:59 +00:00
Testutils: Do not clutter directory with temporary dirs
This commit is contained in:
@@ -2,9 +2,11 @@ import atexit
|
|||||||
import os
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
|
tmpdir = tempfile.TemporaryDirectory()
|
||||||
|
os.environ.setdefault('DATA_DIR', tmpdir.name)
|
||||||
|
|
||||||
from pretix.settings import * # NOQA
|
from pretix.settings import * # NOQA
|
||||||
|
|
||||||
tmpdir = tempfile.TemporaryDirectory()
|
|
||||||
DATA_DIR = tmpdir.name
|
DATA_DIR = tmpdir.name
|
||||||
LOG_DIR = os.path.join(DATA_DIR, 'logs')
|
LOG_DIR = os.path.join(DATA_DIR, 'logs')
|
||||||
MEDIA_ROOT = os.path.join(DATA_DIR, 'media')
|
MEDIA_ROOT = os.path.join(DATA_DIR, 'media')
|
||||||
|
|||||||
+1
-1
@@ -13,4 +13,4 @@ known_third_party = versions
|
|||||||
known_standard_library = typing
|
known_standard_library = typing
|
||||||
multi_line_output = 5
|
multi_line_output = 5
|
||||||
not_skip = __init__.py
|
not_skip = __init__.py
|
||||||
skip = make_testdata.py,wsgi.py,bootstrap,celery.py
|
skip = make_testdata.py,wsgi.py,bootstrap,celery.py,settings.py
|
||||||
|
|||||||
Reference in New Issue
Block a user