Opened 16 years ago
Closed 14 years ago
#2219 defect closed duplicate (duplicate)
isInIOThread() returns False when used in TestCases
Reported by: | sifu | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | trial | Keywords: | |
Cc: | Branch: | ||
Author: |
Description (last modified by )
from twisted.python.threadable import isInIOThread from twisted.trial import unittest class IsInIOThread( unittest.TestCase ): def test_isInIOThread( self ): self.assertEquals( isInIOThread( ), True )
Attachments (1)
Change History (5)
Changed 16 years ago by
Attachment: | trial.patch added |
---|
comment:1 Changed 16 years ago by
this patch fixes it, and doesn't seem to break anything :)
eg: trial on twisted/test: PASSED (skips=31, expectedFailures=7, successes=990)
comment:3 Changed 14 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
The attached patch is very wrong.
This is probably a duplicate of #1614/#3178.
Consider:
from signal import getsignal, SIGCHLD from twisted.internet import reactor from twisted.trial import unittest from twisted.python.threadable import isInIOThread from twisted.internet.task import deferLater class ReactorIsNotRunning(unittest.TestCase): def test_reactorIsRunning(self): print reactor.running print getsignal(SIGCHLD) print isInIOThread() class ReactorIsRunning(ReactorIsNotRunning): def setUp(self): return deferLater(reactor, 0, lambda: None)
comment:4 Changed 11 years ago by
Owner: | Jonathan Lange deleted |
---|
Note: See
TracTickets for help on using
tickets.
path for scripts/trial.py