Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ This can be used to run tests on an invisible virtual display by prepending the
$ xvfb-run pytest ...

We have implemented demodata as data base for testing. On first call of pytest a set of demodata becomes stored
in a /tmp/mss* folder. If you have installed gitpython a postfix of the revision head is added.
in a /tmp/mss* folder.


Setup MSWMS server
Expand Down
1 change: 0 additions & 1 deletion requirements.d/development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ pytest-cov
sphinx
sphinx_rtd_theme
sphinxcontrib-video
gitpython
pynco
conda-verify
pytest-reverse
Expand Down
19 changes: 1 addition & 18 deletions tests/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,30 +28,13 @@
import os
import fs
import tempfile
import logging
from fs.tempfs import TempFS

try:
import git
except ImportError:
SHA = ""
else:
path = os.path.dirname(os.path.realpath(__file__))
repo = git.Repo(path, search_parent_directories=True)
logging.debug(path)
try:
# this is for local development important to get a fresh named tmpdir
SHA = repo.head.object.hexsha[0:10]
except (ValueError, BrokenPipeError) as ex:
logging.debug("Unknown Problem: %s", ex)
# mounted dir in docker container and owner is not root
SHA = ""

CACHED_CONFIG_FILE = None
SERVER_CONFIG_FILE = "mswms_settings.py"
MSCOLAB_CONFIG_FILE = "mscolab_settings.py"
MSCOLAB_AUTH_FILE = "mscolab_auth.py"
ROOT_FS = TempFS(identifier=f"msui{SHA}")
ROOT_FS = TempFS(identifier="msui")
OSFS_URL = ROOT_FS.geturl("", purpose="fs")

ROOT_DIR = ROOT_FS.getsyspath("")
Expand Down
Loading