New submission from ablmf <None>:
Try the code below:
{{{
#!python
#test_call.py
import time
from multiprocessing import Process, Queue
from twisted.trial import unittest
import wx
FRAME_NUM = 4
def f(q):
app = wx.PySimpleApp()
frame = wx.Frame(None, wx.ID_ANY, "Hello World")
frame.Show(True)
q.put(frame.Handle)
app.MainLoop()
def makeFrame():
q = Queue()
p = Process(target=f, args=(q,))
p.start()
return p, q.get()
class TestInvite(unittest.TestCase):
def setUp(self):
self.app = wx.PySimpleApp()
self.frames = []
for i in range(FRAME_NUM):
self.frames.append(makeFrame())
def testInvite(self):
return
def tearDown(self):
self.vb.UserUnregister()
for p, f in self.frames:
p.terminate()
}}}
Error message
{{{
[ERROR]: test_call.py
Traceback (most recent call last):
File "D:\Python26\Lib\site-packages\twisted\trial\runner.py", line 643, in loadByNames
things.append(self.findByName(name))
File "D:\Python26\Lib\site-packages\twisted\trial\runner.py", line 453, in findByName
return reflect.namedAny(name)
File "D:\Python26\lib\site-packages\twisted\python\reflect.py", line 463, in namedAny
raise ObjectNotFound('%r does not name an object' % (name,))
twisted.python.reflect.ObjectNotFound: 'test_call.py' does not name an object
}}}
----------
Type : defect
Component: trial
Keywords :
Priority : normal
Nosy :
----------
http://twistedmatrix.com/trac/ticket/3804
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.