summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrebs <drebs@riseup.net>2017-08-09 18:59:41 -0400
committerKali Kaneko <kali@leap.se>2017-08-23 01:54:57 -0400
commit91c83062cda70ea51251ee4cf638ba6b28ed6c21 (patch)
treed056160ac21349ffccf21d8617a214598a7fa32e
parent723790a19bbee32c5be69c5048ef6ceb595fdd93 (diff)
[test] find correct twistd when outside tox envs
-rw-r--r--testing/tests/conftest.py6
1 files changed, 5 insertions, 1 deletions
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',