Changeset 135 for branches/mk/tests

Show
Ignore:
Timestamp:
08/09/06 05:45:17 (6 years ago)
Author:
mk
Message:

Created add_info method for Index class.
IndexUseTestFramework? renamed to IndexUnitTested?.

Files:

Legend:

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

    r110 r135  
    88 
    99from cheesecake.cheesecake_index import Cheesecake 
    10 from cheesecake.cheesecake_index import IndexUseTestFramework 
     10from cheesecake.cheesecake_index import IndexUnitTested 
    1111from cheesecake import logger 
    1212 
     
    5151""" 
    5252 
    53 class TestIndexUseTestFramework(object): 
     53class TestIndexUnitTested(object): 
    5454    def setUp(self): 
    5555        self.sandbox_dir = tempfile.mkdtemp() 
     
    6060 
    6161    def test_doctest(self): 
    62         "Test use_test_framework index with package that uses doctest." 
     62        "Test unit_tested index with package that uses doctest." 
    6363        def setup(project_dir): 
    6464            main_filename = os.path.join(project_dir, 'main.py') 
     
    100100            asserts(cheesecake) 
    101101 
    102         index = IndexUseTestFramework() 
     102        index = IndexUnitTested() 
    103103        index.compute_with(cheesecake) 
    104104 
    105         # Use of test framework should be discovered and package should get maximum score. 
     105        # Unit tests presence should be discovered and package should get maximum score. 
    106106        print "Index: %d/%d -- %s" % (index.value, index.max_value, index.details) 
    107107        assert index.value == index.max_value 
    108108 
    109109    def test_special_filenames_1(self): 
    110         "Test use_test_framework index with package that uses test_* filenames." 
     110        "Test unit_tested index with package that uses test_* filenames." 
    111111        def setup(project_dir): 
    112112            files = ['some_module.py', 'README', 'test_some_module.py'] 
     
    116116 
    117117    def test_special_filenames_2(self): 
    118         "Test use_test_framework index with package that uses *_test filenames." 
     118        "Test unit_tested index with package that uses *_test filenames." 
    119119        def setup(project_dir): 
    120120            files = ['some_module.py', 'README', 'some_module_test.py'] 
     
    124124 
    125125    def test_special_methods(self): 
    126         "Test use_test_framework index with package that uses setUp/tearDown methods." 
     126        "Test unit_tested index with package that uses setUp/tearDown methods." 
    127127        def setup(project_dir): 
    128128            test_filename = os.path.join(project_dir, 'do_checks.py') 
     
    132132 
    133133    def test_unittest_classes(self): 
    134         "Test use_test_framework index with package that uses unittest library." 
     134        "Test unit_tested index with package that uses unittest library." 
    135135        def setup(project_dir): 
    136136            test_filename = os.path.join(project_dir, 'do_checks.py')