'L{execfile} executes the specified file in the given global and local
namespaces.'

def test_execfileGlobalsAndLocals(self):

    script = self.writeScript(u'foo    +=    1\n')
    globalNamespace = {'foo': 10}
    localNamespace = {'foo': 20}
    execfile(script.path, globalNamespace, localNamespace)
    self.assertEqual(10, globalNamespace['foo'])
    self.assertEqual(21, localNamespace['foo'])
