diff --git a/tests/example_tester_wrap.py b/tests/example_tester_wrap.py index a75642fc..000fb849 100644 --- a/tests/example_tester_wrap.py +++ b/tests/example_tester_wrap.py @@ -28,9 +28,6 @@ sys.modules[__name__].__file__ = example_file # Run the example -if sys.version_info[:2] >= (3, 0): - with open(example_file) as f: - code = compile(f.read(), example_file, "exec") - exec(code, None, None) -else: - execfile(example_file) +with open(example_file) as f: + code = compile(f.read(), example_file, "exec") + exec(code, None, None)