I have problem when running some test code. There is a lot of code so I will paste only summary of a problem:
import pyglet
class Test(object):
def setUp(self):
self.window = pyglet.window.Window()
def tearDown(self):
del self.window
def wtf(self):
self.setUp()
self.tearDown()
self.setUp()
pyglet.app.run()
test = Test()
test.wtf()
I would expect upper code to open 1 window, however it opens 2.
How can I fix this problem?
Aucun commentaire:
Enregistrer un commentaire