Changeset 64
- Timestamp:
- 06/15/06 15:19:21 (6 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/mk/tests/functional/_helper_cheesecake.py
r63 r64 17 17 NOSE_PATH = os.path.join(DATA_PATH, 'nose-0.8.3.tar.gz') 18 18 PACKAGE_PATH = os.path.join(DATA_PATH, 'package2.tar.gz') 19 INVALID_PACKAGE_PATH = os.path.join(DATA_PATH, 'invalid_package.tar.gz') 19 20 20 21 branches/mk/tests/functional/test_cleaning_up.py
r63 r64 3 3 import tempfile 4 4 5 from _helper_cheesecake import FunctionalTest, read_file_contents, NOSE_PATH 5 from _helper_cheesecake import FunctionalTest, read_file_contents, NOSE_PATH, INVALID_PACKAGE_PATH 6 6 7 7 … … 19 19 self.sandbox = tempfile.mkdtemp() 20 20 self.logfile = tempfile.mktemp(prefix='log') 21 22 def test_valid_no_tmp(self): 23 "Check that no files are left in temp by Cheesecake." 21 24 self._run_cheesecake('-p %s -s %s -l %s' % (NOSE_PATH, self.sandbox, self.logfile)) 22 25 23 def test_no_tmp(self):24 "Check that no files are left in temp by Cheesecake."25 26 self._assert_success() 26 27 … … 36 37 # Check that Cheesecake didn't left any new tmp* files. 37 38 assert filter_our_files(get_tmp_files()) == self.temp_files 39 40 def test_invalid_no_tmp(self): 41 "Check that no files are left in temp by Cheesecake during scoring an invalid package." 42 self._run_cheesecake('-p %s -s %s -l %s' % (INVALID_PACKAGE_PATH, self.sandbox, self.logfile)) 43 44 # Package cannot be unpacked, but error was handled and scores, so no error here. 45 self._assert_success() 46 47 # Check that Cheesecake didn't left sandbox. 48 assert not os.path.exists(self.sandbox) 49 50 # Check that Cheesecake didn't left any cheesecake* files. 51 assert glob(os.path.join(tempfile.gettempdir(), "cheesecake*")) == [] 52 53 # Check that Cheesecake didn't left any new tmp* files. 54 assert filter_our_files(get_tmp_files()) == self.temp_files
