[tor-commits] [ooni-probe/master] Move tests to proper directory
art at torproject.org
art at torproject.org
Thu May 31 03:01:43 UTC 2012
commit 59f1b4e82ccc906be419b35bfdc4cce61d69c869
Author: Arturo Filastò <hellais at torproject.org>
Date: Tue May 29 01:45:41 2012 +0200
Move tests to proper directory
---
ooni/tests/worker_test.py | 27 +++++++++++++++++++++++++++
unittest/tests.py | 27 ---------------------------
2 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/ooni/tests/worker_test.py b/ooni/tests/worker_test.py
new file mode 100644
index 0000000..10887b2
--- /dev/null
+++ b/ooni/tests/worker_test.py
@@ -0,0 +1,27 @@
+from twisted.internet import reactor
+from plugoo import work, tests
+
+class StupidAsset(object):
+ def __init__(self):
+ self.idx = 0
+
+ def __iter__(self):
+ return self
+
+ def next(self):
+ if self.idx > 30:
+ raise StopIteration
+ self.idx += 1
+ return self.idx
+
+wgen = work.WorkGenerator(StupidAsset, tests.StupidTest(None, None, None, None), {'bla': 'aaa'}, start=0)
+worker = work.Worker()
+for x in wgen:
+ print "------"
+ print "Work unit"
+ print "------"
+ worker.push(x)
+ print "------"
+
+reactor.run()
+
diff --git a/unittest/tests.py b/unittest/tests.py
deleted file mode 100644
index 10887b2..0000000
--- a/unittest/tests.py
+++ /dev/null
@@ -1,27 +0,0 @@
-from twisted.internet import reactor
-from plugoo import work, tests
-
-class StupidAsset(object):
- def __init__(self):
- self.idx = 0
-
- def __iter__(self):
- return self
-
- def next(self):
- if self.idx > 30:
- raise StopIteration
- self.idx += 1
- return self.idx
-
-wgen = work.WorkGenerator(StupidAsset, tests.StupidTest(None, None, None, None), {'bla': 'aaa'}, start=0)
-worker = work.Worker()
-for x in wgen:
- print "------"
- print "Work unit"
- print "------"
- worker.push(x)
- print "------"
-
-reactor.run()
-
More information about the tor-commits
mailing list