commit 625a902533b9c3429b09fc2f01800b35dfc4179c Author: Nick Mathewson nickm@torproject.org Date: Tue Dec 8 08:15:36 2020 -0500
Fix test_version_argument to work with recent Tors.
Tor now reports versions of libraries and the compilers use to build it. Only the first line has the Tor version. --- test/integ/process.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/test/integ/process.py b/test/integ/process.py index 6abd9e6a..c2388146 100644 --- a/test/integ/process.py +++ b/test/integ/process.py @@ -107,7 +107,11 @@ class TestProcess(unittest.TestCase): Check that 'tor --version' matches 'GETINFO version'. """
- assert_equal('Tor version %s.\n' % test.tor_version(), run_tor(tor_cmd, '--version')) + # We're only interested in the first line of output: + # Other lines are about libraries and compilers. + tor_version = run_tor(tor_cmd, '--version').split("\n")[0] + + assert_equal('Tor version %s.' % test.tor_version(), tor_version)
@asynchronous def test_help_argument(tor_cmd):
tor-commits@lists.torproject.org