~parinporecha/gtg/config_parser_bug

« back to all changes in this revision

Viewing changes to GTG/tests/test_interruptible.py

  • Committer: Izidor Matušov
  • Date: 2013-02-25 07:35:07 UTC
  • Revision ID: izidor.matusov@gmail.com-20130225073507-vgts69uthx7z2run
PEP8ification by Nimit

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
        """ Tests for the @interruptible decorator. """
34
34
        self.quit_condition = False
35
35
        cancellation_point = lambda: _cancellation_point(
36
 
                                        lambda: self.quit_condition)
 
36
            lambda: self.quit_condition)
37
37
        self.thread_started = Event()
38
38
 
39
39
        @interruptible
42
42
            while True:
43
43
                time.sleep(0.1)
44
44
                cancellation_point()
45
 
        thread = Thread(target = never_ending, args = (cancellation_point, ))
 
45
        thread = Thread(target=never_ending, args=(cancellation_point, ))
46
46
        thread.start()
47
47
        self.thread_started.wait()
48
48
        self.quit_condition = True