[tor-commits] [stem/master] Only respecting open default when undefined
atagar at torproject.org
atagar at torproject.org
Sat Nov 26 18:28:32 UTC 2011
commit 8f8257d4ddcf6830b2413f53890a1fab4414ab45
Author: Damian Johnson <atagar at torproject.org>
Date: Fri Nov 25 22:42:35 2011 -0800
Only respecting open default when undefined
When no target is defined we should have a test.runner.TorConnection.OPEN
default for integraiton tests. However, if we have an alternative connection
target then this should be overwritten.
---
run_tests.py | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/run_tests.py b/run_tests.py
index 8fa7107..800cab2 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -214,19 +214,21 @@ if __name__ == '__main__':
else:
# mapping of config type to (enum, default) tuple
conn_type_mappings = {
- "none": (test.runner.TorConnection.NONE, False),
- "open": (test.runner.TorConnection.OPEN, True),
- "password": (test.runner.TorConnection.PASSWORD, False),
- "cookie": (test.runner.TorConnection.COOKIE, False),
- "multiple": (test.runner.TorConnection.MULTIPLE, False),
- "socket": (test.runner.TorConnection.SOCKET, False),
+ "none": test.runner.TorConnection.NONE,
+ "open": test.runner.TorConnection.OPEN,
+ "password": test.runner.TorConnection.PASSWORD,
+ "cookie": test.runner.TorConnection.COOKIE,
+ "multiple": test.runner.TorConnection.MULTIPLE,
+ "socket": test.runner.TorConnection.SOCKET,
}
for type_key in conn_type_mappings:
- default = conn_type_mappings[type_key][1]
-
- if test_config.get("test.integ.target.connection.%s" % type_key, default):
- connection_types.append(conn_type_mappings[type_key][0])
+ if test_config.get("test.integ.target.connection.%s" % type_key, False):
+ connection_types.append(conn_type_mappings[type_key])
+
+ # TorConnection.OPEN is the default if we don't have any defined
+ if not connection_types:
+ connection_types = [test.runner.TorConnection.OPEN]
for connection_type in connection_types:
try:
More information about the tor-commits
mailing list