Beispiel #1
0
class ProjectManifestTests (unittest.TestCase):
    def setUp (self):
        self.project = Project(basedir="/imaginary", name="Unittest")
    
    def test_should_raise_exception_when_given_glob_pattern_is_none (self):
        self.assertRaises(ValueError, self.project._manifest_include, None)
        
    def test_should_raise_exception_when_given_glob_pattern_is_empty_string (self):
        self.assertRaises(ValueError, self.project._manifest_include, "       \n")
        
    def test_should_add_filename_to_list_of_included_files (self):
        self.project._manifest_include("spam")
        self.assertEquals(["spam"], self.project.manifest_included_files)
        
    def test_should_add_filenames_in_correct_order_to_list_of_included_files (self):
        self.project._manifest_include("spam")
        self.project._manifest_include("egg")
        self.project._manifest_include("yadt")
        self.assertEquals(["spam", "egg", "yadt"], self.project.manifest_included_files)