Changeset 90

Show
Ignore:
Timestamp:
07/19/06 10:12:20 (2 years ago)
Author:
mk
Message:

Don't keep logfiles when running tests (supplement for changeset [86]).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/mk/tests/unit/test_index_unpack.py

    r86 r90  
    1414 
    1515    def tearDown(self): 
    16         if not self.cheesecake: 
    17             return 
    18         self.cheesecake.cleanup() 
     16        if self.cheesecake: 
     17            self.cheesecake.cleanup() 
    1918 
    2019        if self.logfile: 
     
    5655            # If run failed log file should not be deleted. 
    5756            assert os.path.isfile(self.logfile) 
    58             # Now delete the file so that it doesn't pollute /tmp 
    59             os.unlink(self.logfile) 
    6057 
    6158    def test_index_unpack_invalid_tar_gz(self): 
  • branches/mk/tests/unit/test_index_url_download.py

    r86 r90  
    1313        self.cheesecake = None 
    1414 
    15     def _cleanup(self, logfile): 
    16         if os.path.exists(logfile): 
    17             os.unlink(logfile) 
    18  
    1915    def _run_it(self, test_fun): 
    2016        logfile = tempfile.mktemp() 
    21         print logfile 
    2217 
    2318        try: 
     
    2621            if self.cheesecake: 
    2722                self.cheesecake.cleanup() 
    28             print "cleaning up", logfile 
    29             self._cleanup(logfile) 
     23 
     24            if os.path.exists(logfile): 
     25                os.unlink(logfile) 
    3026 
    3127    def test_index_url_download_valid_url(self):