def test_execfileGlobals(self):
        """
        L{execfile} executes the specified file in the given global namespace.
        """
        script = self.writeScript(u"foo += 1\n")
        globalNamespace = {"foo": 1}
        execfile(script.path, globalNamespace)
        self.assertEqual(2, globalNamespace["foo"])

        L{execfile} executes the specified file in the given global namespace.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_compat.py