Skip to content

Commit 9d3312e

Browse files
authored
a tmp dir does not need a 2nd random var (Open-MSS#2604)
1 parent 8811fc3 commit 9d3312e

File tree

3 files changed

+2
-20
lines changed

3 files changed

+2
-20
lines changed

docs/development.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ This can be used to run tests on an invisible virtual display by prepending the
226226
$ xvfb-run pytest ...
227227

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

231231

232232
Setup MSWMS server

requirements.d/development.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ pytest-cov
1212
sphinx
1313
sphinx_rtd_theme
1414
sphinxcontrib-video
15-
gitpython
1615
pynco
1716
conda-verify
1817
pytest-reverse

tests/constants.py

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,30 +28,13 @@
2828
import os
2929
import fs
3030
import tempfile
31-
import logging
3231
from fs.tempfs import TempFS
3332

34-
try:
35-
import git
36-
except ImportError:
37-
SHA = ""
38-
else:
39-
path = os.path.dirname(os.path.realpath(__file__))
40-
repo = git.Repo(path, search_parent_directories=True)
41-
logging.debug(path)
42-
try:
43-
# this is for local development important to get a fresh named tmpdir
44-
SHA = repo.head.object.hexsha[0:10]
45-
except (ValueError, BrokenPipeError) as ex:
46-
logging.debug("Unknown Problem: %s", ex)
47-
# mounted dir in docker container and owner is not root
48-
SHA = ""
49-
5033
CACHED_CONFIG_FILE = None
5134
SERVER_CONFIG_FILE = "mswms_settings.py"
5235
MSCOLAB_CONFIG_FILE = "mscolab_settings.py"
5336
MSCOLAB_AUTH_FILE = "mscolab_auth.py"
54-
ROOT_FS = TempFS(identifier=f"msui{SHA}")
37+
ROOT_FS = TempFS(identifier="msui")
5538
OSFS_URL = ROOT_FS.geturl("", purpose="fs")
5639

5740
ROOT_DIR = ROOT_FS.getsyspath("")

0 commit comments

Comments
 (0)