[py-svn] pytest commit 9d430445abb6: python3 fixes

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Nov 24 03:31:46 CET 2010


# HG changeset patch -- Bitbucket.org
# Project pytest
# URL http://bitbucket.org/hpk42/pytest/overview
# User Benjamin Peterson <benjamin at python.org>
# Date 1290565927 21600
# Node ID 9d430445abb6f3235910b3d3d679a16135588e39
# Parent  0fb3d4517695c142c743c1702efd32015a158d02
python3 fixes

--- a/bench/empty.py
+++ b/bench/empty.py
@@ -1,3 +1,3 @@
-
+import py
 for i in range(1000):
-    exec "def test_func_%d(): pass" % i
+    py.builtin.exec_("def test_func_%d(): pass" % i)

--- a/bench/bench.py
+++ b/bench/bench.py
@@ -7,4 +7,4 @@ if __name__ == '__main__':
     p = pstats.Stats("prof")
     p.strip_dirs()
     p.sort_stats('cumulative')
-    print p.print_stats(30)
+    print(p.print_stats(30))



More information about the pytest-commit mailing list