test.integ.process seems to expect a tor binary in $PATH
test.integ.process
seems to expect to find a system tor
binary in $PATH
. This is probably not intended (and if it is, it should be clearly documented). This prevents the tests from working on a system with no tor
binary in the $PATH
, which is a configuration I think we should support.
I tried to create an alternative way to replicate this failure by putting a shell script called tor
in a directory by itself at the head of my $PATH
that just does a kill -ABRT $$
but that caused test.integ.version.TestVersion
to fail instead (and test.integ.process
to succeed, oddly enough). Maybe the only way to reliably replicate this is by removing (or renaming) the system tor
.
tlyu@arcadia:~/src/stem$ ./run_tests.py --tor `pwd`/../tor/src/or/tor --all --log notice --target RUN_ALL
produces errors like
======================================================================
ERROR: test_no_orphaned_process
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/tlyu/src/stem/test/require.py", line 58, in wrapped
return func(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 1305, in patched
return func(*args, **keywargs)
File "/home/tlyu/src/stem/test/integ/process.py", line 210, in test_no_orphaned_process
stem.process.launch_tor()
File "/home/tlyu/src/stem/stem/process.py", line 98, in launch_tor
raise OSError("'%s' isn't available on your system. Maybe it's not in your PATH?" % tor_cmd)
OSError: 'tor' isn't available on your system. Maybe it's not in your PATH?
----------------------------------------------------------------------
Ran 21 tests in 0.972s
FAILED (errors=1, skipped=7)