[Zope3-checkins] CVS: Zope3/lib/python/Zope/Server/FTP/tests - testFTPServer.py:1.3

Jim Fulton jim@zope.com
Thu, 17 Oct 2002 09:31:59 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/Server/FTP/tests
In directory cvs.zope.org:/tmp/cvs-serv20668/lib/python/Zope/Server/FTP/tests

Modified Files:
	testFTPServer.py 
Log Message:

Fixed a test that was opening the main database. This was bad, as the
tests should not touch this. Also, you couldn't run the tests while
the application was running.

Fixed a number of tests that created temporary files and didn't clean
them up. *Hopefully*, there aren't any leaked files that would cause
this to fail on windows.



=== Zope3/lib/python/Zope/Server/FTP/tests/testFTPServer.py 1.2 => 1.3 ===
--- Zope3/lib/python/Zope/Server/FTP/tests/testFTPServer.py:1.2	Mon Jun 10 19:29:35 2002
+++ Zope3/lib/python/Zope/Server/FTP/tests/testFTPServer.py	Thu Oct 17 09:31:58 2002
@@ -21,6 +21,7 @@
 import os
 from asyncore import socket_map, poll
 import socket
+import shutil
 from types import StringType
 from StringIO import StringIO
 
@@ -96,6 +97,8 @@
                 break
             poll(0.1, socket_map)
 
+        if os.path.exists(self.root_dir):
+            shutil.rmtree(self.root_dir)
 
     def loop(self):
         while self.run_loop: