aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-10-21 14:33:52 -0400
committerNick Mathewson <nickm@torproject.org>2013-10-21 14:35:01 -0400
commit338bcad9e4b287664e6be94cbeb332e41e03a3c0 (patch)
tree2052c7d0fb59965d0a66ddd863b17e74449518a4 /src/test
parentb7a17de454c9c2721059393d237f3984bd5aa74f (diff)
downloadtor-338bcad9e4b287664e6be94cbeb332e41e03a3c0.tar.gz
tor-338bcad9e4b287664e6be94cbeb332e41e03a3c0.zip
Make test_cmdline_args.py work with older pythons
I was using the assertIn() function on unit tests, which Python 2.7 introduced. But we'd like to be able to run our unit tests on Pythons from older operating systems.
Diffstat (limited to 'src/test')
-rwxr-xr-xsrc/test/test_cmdline_args.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test_cmdline_args.py b/src/test/test_cmdline_args.py
index 1b0963f6b9..2213bb5702 100755
--- a/src/test/test_cmdline_args.py
+++ b/src/test/test_cmdline_args.py
@@ -163,9 +163,9 @@ class CmdlineTests(unittest.TestCase):
out_fl = lines(out_fl)
self.assert_(len(out_fl) > 100)
- self.assertIn("SocksPort 9999", out_fl)
- self.assertIn("SafeLogging 0", out_fl)
- self.assertIn("ClientOnly 0", out_fl)
+ self.assert_("SocksPort 9999" in out_fl)
+ self.assert_("SafeLogging 0" in out_fl)
+ self.assert_("ClientOnly 0" in out_fl)
self.assert_(out_verif.endswith("Configuration was valid\n"))