def METHOD_NAME(self):
    python2_print_str = 'for i in s: print i'
    with self.assertRaises(SyntaxError) as context:
        exec(python2_print_str)
    self.assertIn("Missing parentheses in call to 'print'. Did you mean print(...)",
            str(context.exception))