diff --git a/master/buildbot/test/unit/test_config.py b/master/buildbot/test/unit/test_config.py
index <HASH>..<HASH> 100644
--- a/master/buildbot/test/unit/test_config.py
+++ b/master/buildbot/test/unit/test_config.py
@@ -237,7 +237,7 @@ class MasterConfig(ConfigErrorsMixin, dirs.DirsMixin, unittest.TestCase):
     def test_loadConfig_parse_error(self):
         self.install_config_file('def x:\nbar')
         self.assertRaisesConfigError(
-            re.compile("error while parsing.*traceback in logfile"),
+            re.compile("encountered a SyntaxError while parsing config file:"),
             lambda: config.MasterConfig.loadConfig(
                 self.basedir, self.filename))
         self.assertEqual(len(self.flushLoggedErrors(SyntaxError)), 1)
Modify test case to check for syntax error

Change the error to be checked in testfile when a syntax error is
encountered in the master config file