예제 #1
0
 def test_not_matching_extension_returns_false(self):
     self.assertFalse(ByExtensions(['cpp'])(Changeset(['script.py'])))
예제 #2
0
    def test_str_returns_description_of_filter_for_multiple_extensions(self):
        extensions_filter = ByExtensions(['cpp', 'h'])

        self.assertEquals('Extensions: cpp, h', extensions_filter.__str__())
예제 #3
0
 def test_matching_extension_must_be_at_end_preceeded_by_point(self):
     self.assertFalse(ByExtensions(['cpp'])(Changeset(['noextensioncpp'])))
예제 #4
0
 def test_matches_with_any_of_multiple_extensions(self):
     self.assertTrue(ByExtensions(['py', 'cpp'])(Changeset(['codefile.cpp'])))
예제 #5
0
 def test_will_match_any_of_multiple_files(self):
     self.assertTrue(ByExtensions(['py'])(Changeset(['codefile.cpp', 'script.py'])))