def test_fails_on_unsupported_vcs(self): """ tests that the parser fails if an unsupported vcs is specified """ r = Rover('') r.parse_config(StringIO('acme/project9, HEAD, blah')) self.assert_(len(r.config_errors) > 0)
def test_fails_on_include(self): """ tests that the parser fails on include lines (includes are no longer allowed) """ r = Rover('') r.parse_config(StringIO('@include big_mess.csv')) self.assert_(len(r.config_errors) > 0)
def test_fails_on_formatting_error(self): """ tests that the parser fails if a config line is formatted incorrectly (e.g. wrong number of items) """ r = Rover('') r.parse_config(StringIO('acme/project9, HEAD')) self.assert_(len(r.config_errors) > 0)
def test_fails_on_unsupported_vcs(self): """ tests that the parser fails if an unsupported vcs is specified """ r = Rover('') r.parse_config(StringIO('acme/project9, HEAD, blah')) self.assertEqual('unknown repository: "acme/project9, HEAD, blah"' , r.config_errors[0]) self.assertTrue(len(r.config_errors) <= 1)
def test_fails_on_formatting_error(self): """ tests that the parser fails if a config line is formatted incorrectly (e.g. wrong number of items) """ r = Rover('') r.parse_config(StringIO('acme/project9, HEAD')) self.assertEqual('invalid config line: "acme/project9, HEAD"' , r.config_errors[0]) self.assertTrue(len(r.config_errors) <= 1)