[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem/master] AttributeError exception for catching non existing methods
commit b0236abe4c003a1bc5b72419bba2761e126068f4
Author: Cristóbal <cristobal.leiva@xxxxxxxx>
Date: Fri Mar 6 19:06:14 2015 -0300
AttributeError exception for catching non existing methods
---
run_tests.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/run_tests.py b/run_tests.py
index 497a3fc..876b296 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -465,10 +465,13 @@ def _run_test(args, test_class, output_filters, logging_buffer):
try:
suite = unittest.TestLoader().loadTestsFromName(test_class)
- except:
+ except AttributeError, e:
# should only come up if user provided '--test' for something that doesn't exist
println(" no such test", ERROR)
return None
+ except:
+ println(" failed", ERROR)
+ return None
test_results = StringIO()
run_result = unittest.TextTestRunner(test_results, verbosity=2).run(suite)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits