Show
Ignore:
Timestamp:
08/04/06 08:40:20 (6 years ago)
Author:
mk
Message:

Implemented --keep-log command line option.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/mk/tests/functional/test_options.py

    r94 r129  
    11 
    22import os 
     3import tempfile 
    34 
    45from _helper_cheesecake import FunctionalTest, read_file_contents, NOSE_PATH, PACKAGE_PATH 
     
    8788        # Make sure that --quiet generates less information than default operation. 
    8889        assert len(quiet) < len(normal) 
     90 
     91    def test_keep_log(self): 
     92        logfile = tempfile.mktemp(prefix='log') 
     93        self._run_cheesecake('--path %s --logfile %s --keep-log' % (NOSE_PATH, logfile)) 
     94 
     95        self._assert_success() 
     96 
     97        # Make sure that log file was left. 
     98        assert os.path.exists(logfile) 
     99 
     100        # Delete the logfile now. 
     101        os.unlink(logfile)