Changeset 130
- Timestamp:
- 08/04/06 08:53:18 (2 years ago)
- Files:
-
- branches/mk/tests/functional/test_cleaning_up.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/mk/tests/functional/test_cleaning_up.py
r88 r130 10 10 return filter(lambda filename: os.lstat(filename).st_uid == uid, files) 11 11 12 def get_tmp_files_starting_with(prefix): 13 return glob(os.path.join(tempfile.gettempdir(), prefix + "*")) 14 12 15 def get_tmp_files(): 13 return glob(os.path.join(tempfile.gettempdir(), tempfile.gettempprefix() + "*")) 16 return get_tmp_files_starting_with(tempfile.gettempprefix()) 17 18 def get_cheesecake_files(): 19 return get_tmp_files_starting_with("cheesecake") 14 20 15 21 … … 17 23 def setUp(self): 18 24 self.temp_files = filter_our_files(get_tmp_files()) 25 self.cheesecake_files = filter_our_files(get_cheesecake_files()) 19 26 self.sandbox = tempfile.mkdtemp() 20 27 self.logfile = tempfile.mktemp(prefix='log') … … 33 40 34 41 # Check that Cheesecake didn't leave any cheesecake* files. 35 assert glob(os.path.join(tempfile.gettempdir(), "cheesecake*")) == []42 assert filter_our_files(get_cheesecake_files()) == self.cheesecake_files 36 43 37 44 # Check that Cheesecake didn't leave any new tmp* files.
