[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [ooni-probe/master] Started implementing a way for a test to abort itself,



commit 3750cb43e72eb7de8b01fc824bac3121fa9678f0
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Wed Nov 28 18:34:06 2012 +0000

    Started implementing a way for a test to abort itself,
    nettest.NetTestCase.__test_done__().
---
 ooni/nettest.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/ooni/nettest.py b/ooni/nettest.py
index a2f98c4..a868ac4 100644
--- a/ooni/nettest.py
+++ b/ooni/nettest.py
@@ -166,3 +166,8 @@ class NetTestCase(object):
     def __repr__(self):
         return "<%s inputs=%s>" % (self.__class__, self.inputs)
 
+    def __test_done__(self):
+        up = inspect.stack()
+        parent = up[1]
+        # XXX call oreporter.allDone() from parent stack frame
+        raise NotImplemented



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits