Use a shorter XDG_RUNTIME_DIR for temp_basedir_env

Otherwise with longer test names, we can't listen to the IPC server as
the filename is too long for a local socket.
This commit is contained in:
Florian Bruhin 2016-09-09 18:43:12 +02:00
parent 143a4af91b
commit a4d0449e19

View File

@ -36,7 +36,7 @@ def _base_args(config):
@pytest.fixture @pytest.fixture
def temp_basedir_env(tmpdir): def temp_basedir_env(tmpdir, short_tmpdir):
"""Return a dict of environment variables that fakes --temp-basedir. """Return a dict of environment variables that fakes --temp-basedir.
We can't run --basedir or --temp-basedir for some tests, so we mess with We can't run --basedir or --temp-basedir for some tests, so we mess with
@ -44,7 +44,7 @@ def temp_basedir_env(tmpdir):
""" """
data_dir = tmpdir / 'data' data_dir = tmpdir / 'data'
config_dir = tmpdir / 'config' config_dir = tmpdir / 'config'
runtime_dir = tmpdir / 'runtime' runtime_dir = short_tmpdir / 'rt'
cache_dir = tmpdir / 'cache' cache_dir = tmpdir / 'cache'
runtime_dir.ensure(dir=True) runtime_dir.ensure(dir=True)