From 91c83062cda70ea51251ee4cf638ba6b28ed6c21 Mon Sep 17 00:00:00 2001 From: drebs Date: Wed, 9 Aug 2017 18:59:41 -0400 Subject: [test] find correct twistd when outside tox envs --- testing/tests/conftest.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'testing/tests/conftest.py') diff --git a/testing/tests/conftest.py b/testing/tests/conftest.py index 40ad5568..1b8d380a 100644 --- a/testing/tests/conftest.py +++ b/testing/tests/conftest.py @@ -117,8 +117,12 @@ class SoledadServer(object): def start(self): self._create_conf_file() # start the server + executable = 'twistd' + if 'VIRTUAL_ENV' not in os.environ: + executable = os.path.join( + os.path.dirname(os.environ['_']), 'twistd') check_call([ - 'twistd', + executable, '--logfile=%s' % self._logfile, '--pidfile=%s' % self._pidfile, 'web', -- cgit v1.2.3