def test_check_arguments(self): message = "got an unexpected keyword argument 'not_existing'" with self.assertRaisesRegex(TypeError, message): asynctest.fail_on(foo=True, not_existing=True)