def test_duplicate_global_local(self):
    self.assertRaises(SyntaxError, exec, 'def f(a): global a; a = 1')
def test_duplicate_global_local(self):
    self.assertRaises(SyntaxError, exec, 'def f(a): global a; a = 1')