~pythonregexp2.7/python/issue2636-01+09-02

« back to all changes in this revision

Viewing changes to Lib/test/test_queue.py

  • Committer: Jeffrey C. "The TimeHorse" Jacobs
  • Date: 2008-09-22 00:16:16 UTC
  • mfrom: (39022.1.34 Regexp-2.7)
  • Revision ID: darklord@timehorse.com-20080922001616-p1wdip9lfp0zl5cu
Merged in changes from the Atomic Grouping / Possessive Qualifiers branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
        self.t.start()
50
50
        self.result = block_func(*block_args)
51
51
        # If block_func returned before our thread made the call, we failed!
52
 
        if not self.t.startedEvent.isSet():
 
52
        if not self.t.startedEvent.is_set():
53
53
            self.fail("blocking function '%r' appeared not to block" %
54
54
                      block_func)
55
55
        self.t.join(10) # make sure the thread terminates
56
 
        if self.t.isAlive():
 
56
        if self.t.is_alive():
57
57
            self.fail("trigger function '%r' appeared to not return" %
58
58
                      trigger_func)
59
59
        return self.result
73
73
                                 expected_exception_class)
74
74
        finally:
75
75
            self.t.join(10) # make sure the thread terminates
76
 
            if self.t.isAlive():
 
76
            if self.t.is_alive():
77
77
                self.fail("trigger function '%r' appeared to not return" %
78
78
                                 trigger_func)
79
 
            if not self.t.startedEvent.isSet():
 
79
            if not self.t.startedEvent.is_set():
80
80
                self.fail("trigger thread ended but event never set")
81
81
 
82
82