[py-svn] r11024 - py/dist/py/test/tkinter

jan at codespeak.net jan at codespeak.net
Fri Apr 22 16:22:40 CEST 2005


Author: jan
Date: Fri Apr 22 16:22:40 2005
New Revision: 11024

Modified:
   py/dist/py/test/tkinter/backend.py
Log:
don't reuse gateway


Modified: py/dist/py/test/tkinter/backend.py
==============================================================================
--- py/dist/py/test/tkinter/backend.py	(original)
+++ py/dist/py/test/tkinter/backend.py	Fri Apr 22 16:22:40 2005
@@ -72,7 +72,6 @@
         self._message_callback = Null()
         self._messages_callback = Null()
         self.config = config
-        self.gateway = None
 
     def running(self):
         '''are there tests running?'''
@@ -85,7 +84,6 @@
         if self.running:
             self.channel.close()
             self.channel.gateway.exit()
-            self.gateway = None
     
     def get_repository(self):
         '''return the repository'''
@@ -113,11 +111,12 @@
         self._messages_callback(changed_report_ids)
 
     def start_tests(self, config = None, args = [], tests = []):
+        if self.running:
+            return
         if config is None:
             config = self.config
         self.testrepository = TestRepository()
-        if not self.gateway:
-            self.gateway = py.execnet.PopenGateway(config.option.executable) 
+        self.gateway = py.execnet.PopenGateway(config.option.executable) 
         self.channel = self.gateway.newchannel(receiver = self.queue.put)
         self.gateway.remote_exec(channel = self.channel, source = '''
         import py



More information about the pytest-commit mailing list