Patch #1550800: make exec a function.
diff --git a/Lib/test/test_importhooks.py b/Lib/test/test_importhooks.py
index d31bcb2..5077d98 100644
--- a/Lib/test/test_importhooks.py
+++ b/Lib/test/test_importhooks.py
@@ -81,7 +81,7 @@
         mod.__loader__ = self
         if ispkg:
             mod.__path__ = self._get__path__()
-        exec code in mod.__dict__
+        exec(code, mod.__dict__)
         return mod