Commits

osimons  committed 44d0d93

[svn r13203] XmlRpcPlugin: Safer strategy for terminating functional test server. Refs #11109.

  • Participants
  • Parent commits 106ebd3

Comments (0)

Files changed (1)

File trunk/tracrpc/tests/__init__.py

 
     class RpcTestEnvironment(SvnFunctionalTestEnvironment):
 
-        def __del__(self):
-            print "\nStopping web server...\n"
-            self.stop()
-            if hasattr(SvnFunctionalTestEnvironment, '__del__'):
-                SvnFunctionalTestEnvironment.__del__(self)
-
         def init(self):
             self.trac_src = os.path.realpath(os.path.join( 
                     __import__('trac', []).__file__, '..' , '..'))
                 os.path.realpath(__file__), '..', '..', '..', 'rpctestenv')),
                 '8765', 'http://127.0.0.1')
 
+    import atexit
+    atexit.register(rpc_testenv.stop)
+
     def test_suite():
         suite = unittest.TestSuite()
         import tracrpc.tests.api