commit 9f0304b59b86d8d3be3e6d1564111b92fc18a1e8 Author: Isis Lovecruft isis@torproject.org Date: Thu Nov 1 11:59:45 2012 +0000
* Worked out the last bit of the bug with tests not getting all the different available inputs, i.e. a test would take things from an input file, and then not from commandline of from hardcoded parameters. I think it's done. A couple of the tests are still giving errors. --- ooni/runner.py | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/ooni/runner.py b/ooni/runner.py index f10f9ca..ae086c1 100644 --- a/ooni/runner.py +++ b/ooni/runner.py @@ -244,10 +244,10 @@ def loadTestsAndOptions(classes, config):
if hasattr(klass, 'optParameters') or hasattr(klass, 'inputFile'): try: - opts = processTestOptions(klass, config) - print opts, config + opt = processTestOptions(klass, config) + print opt, config except: - opts = {} + opt = {} finally: instance = klass() try: @@ -255,11 +255,11 @@ def loadTestsAndOptions(classes, config): except Exception, e: inputs = []; log.err(e) else: - opts.update({'inputs': inputs}) - finally: - options.append(opts) - log.debug("loadTestsAndOptions(): type(opts)=%s" % type(opts)) - + if opt and opt is not None: + opt.update({'inputs':inputs}) + else: pass + finally: options.append(opt) + log.debug("loadTestsAndOptions(): type(opt)=%s" % type(opt)) return test_cases, options
class ORunner(object):
tor-commits@lists.torproject.org