Commits

Anonymous committed 543fed3

Start of pep8 changes.

  • Participants
  • Parent commits 33e42b5

Comments (0)

Files changed (1)

 #!/usr/bin/env python
 
-import glob, os, signal, sys, thread, time, unittest
+import glob
+import os
+import signal
+import sys
+import thread
+import time
+import unittest
 
 """
 # skip code, disabled due to odd raise in Cython code
         unittest2 does NOT work under Python 2.2.
         Could potentially use nose or py.test which has (previously)
         supported Python 2.2
-          * nose http://python-nose.googlecode.com/svn/wiki/NoseWithPython2_2.wiki
-          * py.test http://codespeak.net/pipermail/py-dev/2005-February/000203.html
+          * nose
+            http://python-nose.googlecode.com/svn/wiki/NoseWithPython2_2.wiki
+          * py.test
+            http://codespeak.net/pipermail/py-dev/2005-February/000203.html
         """
         if unittest2:
             raise unittest2.SkipTest(reason)
             self.call_back_ran = True
             assert int(now - ts['start']) == ts['secs'], 'timeout failed'
         print 'test_timeout'
-        ts = { 'start':time.time(), 'secs':5 }
+        ts = {'start': time.time(), 'secs': 5}
         ev = event.event(__timeout_cb, arg=ts)
         ev.add(ts['secs'])
         event.dispatch()
         if not hasattr(signal, 'SIGUSR1'):
             self.skip('signal.SIGUSR1 missing (probably Windows)')
         else:
+            
             def __signal_cb(ev, sig, evtype, arg):
                 if evtype == event.EV_SIGNAL:
                     ev.delete()
         if not hasattr(signal, 'SIGUSR1'):
             self.skip('signal.SIGUSR1 missing (probably Windows)')
         else:
+            
             def __signal2_cb(sig):
                 if sig:
                     event.abort()
 
     def test_exception(self):
         print 'test_exception'
+        
         def __bad_cb(foo):
             raise NotImplementedError(foo)
         event.timeout(0, __bad_cb, 'bad callback')
 
     def test_abort(self):
         print 'test_abort'
+        
         def __time_cb():
             raise NotImplementedError('abort failed!')
         event.timeout(5, __time_cb)
 
     def test_callback_exception(self):
         print 'test_callback_exception'
+        
         def __raise_cb(exc):
             raise exc
+        
         def __raise_catch_cb(exc):
             try:
                 raise exc
         self.call_back_ran_a = False
         self.call_back_ran_b = False
         print 'test_thread'
+        
         def __time_cb(d):
             self.call_back_ran_a = True
             assert d['count'] == 3
+        
         def __time_thread(count, d):
             self.call_back_ran_b = True
             for i in range(count):
                 time.sleep(1)
                 d['count'] += 1
-        d = { 'count': 0 }
+        d = {'count': 0}
         thread.start_new_thread(__time_thread, (3, d))
         event.timeout(4, __time_cb, d)
         event.dispatch()