Changeset 63
- Timestamp:
- 06/15/06 13:33:56 (6 years ago)
- Files:
-
- branches/mk/tests/functional/_helper_cheesecake.py (modified) (1 diff)
- branches/mk/tests/functional/test_cleaning_up.py (modified) (2 diffs)
- branches/mk/tests/functional/test_options.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/mk/tests/functional/_helper_cheesecake.py
r61 r63 36 36 assert read_file_contents(self.stderr_name) == '' 37 37 38 def tearDown(self):38 def _cleanup(self): 39 39 os.unlink(self.stdout_name) 40 40 os.unlink(self.stderr_name) 41 42 def tearDown(self): 43 self._cleanup() 41 44 42 45 branches/mk/tests/functional/test_cleaning_up.py
r61 r63 6 6 7 7 8 def filter_our_files(files): 9 uid = os.getuid() 10 return filter(lambda filename: os.lstat(filename).st_uid == uid, files) 11 12 def get_tmp_files(): 13 return glob(os.path.join(tempfile.gettempdir(), tempfile.gettempprefix() + "*")) 14 15 8 16 class TestCleaningUp(FunctionalTest): 9 17 def setUp(self): 18 self.temp_files = filter_our_files(get_tmp_files()) 10 19 self.sandbox = tempfile.mkdtemp() 11 20 self.logfile = tempfile.mktemp(prefix='log') … … 25 34 assert glob(os.path.join(tempfile.gettempdir(), "cheesecake*")) == [] 26 35 27 # Check that Cheesecake didn't left any tmp* files.28 assert glob(os.path.join(tempfile.gettempdir(), tempfile.gettempprefix() + "*")) == []36 # Check that Cheesecake didn't left any new tmp* files. 37 assert filter_our_files(get_tmp_files()) == self.temp_files branches/mk/tests/functional/test_options.py
r61 r63 70 70 self._run_cheesecake('--path %s' % PACKAGE_PATH) 71 71 normal = read_file_contents(self.stdout_name) 72 self._cleanup() 72 73 73 74 self._run_cheesecake('--path %s --verbose' % PACKAGE_PATH) … … 80 81 self._run_cheesecake('--path %s' % PACKAGE_PATH) 81 82 normal = read_file_contents(self.stdout_name) 83 self._cleanup() 82 84 83 85 self._run_cheesecake('--path %s --quiet' % PACKAGE_PATH)
