summary refs log tree commit diff stats
path: root/test/tc_signal.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-03-31 05:16:47 +0200
committerhut <hut@lavabit.com>2010-03-31 05:16:47 +0200
commitc8085cbd1b83ba69ddb76c2d1a4dbfb5b1eb10ea (patch)
tree6fccb638f564fdd9a071b55271a32a1b7e28ecb4 /test/tc_signal.py
parente2e31c3c84f0b7c95591a7d2244d7add345a442f (diff)
downloadranger-c8085cbd1b83ba69ddb76c2d1a4dbfb5b1eb10ea.tar.gz
removed RegexpSignalDispatcher, I don't use it
Diffstat (limited to 'test/tc_signal.py')
-rw-r--r--test/tc_signal.py43
1 files changed, 0 insertions, 43 deletions
diff --git a/test/tc_signal.py b/test/tc_signal.py
index feba3e5b..35b4eebe 100644
--- a/test/tc_signal.py
+++ b/test/tc_signal.py
@@ -130,48 +130,5 @@ class TestSignal(unittest.TestCase):
 		self.assertEqual('ab', ''.join(alphabet))
 		self.assertTrue(is_deleted[0])
 
-
-	def test_regexp_signals(self):
-		sd = RegexpSignalDispatcher()
-		lst = []
-		def modify(s):
-			s.number = 5
-		def set_number(s):
-			lst.append(s.number)
-		def stopit(s):
-			s.stop()
-
-		h1 = sd.signal_bind_regexp('.*ar', modify, priority=1)
-
-		sd.signal_bind('xyz', set_number)
-		sd.signal_bind('foobar', set_number)
-
-		sd.signal_emit('xyz', number=10)
-		self.assertEqual(10, lst[-1])
-		sd.signal_emit('foobar', number=10)
-		self.assertEqual(5, lst[-1])
-
-		h2 = sd.signal_bind_regexp('x.z', modify, priority=1)
-#		print(sd._signals)
-
-		sd.signal_emit('xyz', number=10)
-		self.assertEqual(5, lst[-1])
-		sd.signal_emit('foobar', number=10)
-		self.assertEqual(5, lst[-1])
-
-		sd.signal_unbind(h2)
-
-		sd.signal_emit('xyz', number=10)
-		self.assertEqual(10, lst[-1])
-		sd.signal_emit('foobar', number=10)
-		self.assertEqual(5, lst[-1])
-
-		sd.signal_unbind(h1)
-
-		sd.signal_emit('xyz', number=10)
-		self.assertEqual(10, lst[-1])
-		sd.signal_emit('foobar', number=10)
-		self.assertEqual(10, lst[-1])
-
 if __name__ == '__main__':
 	unittest.main()