Browse Source

python3 tests passing

Keith Newman 10 years ago
parent
commit
b9c4031886
1 changed files with 2 additions and 2 deletions
  1. 2 2
      frameworks/Python/cherrypy/app.py

+ 2 - 2
frameworks/Python/cherrypy/app.py

@@ -70,7 +70,7 @@ class CherryPyBenchmark(object):
 
 
     rp = partial(randint, 1, 10000)
     rp = partial(randint, 1, 10000)
     get = cherrypy.request.db.query(World).get
     get = cherrypy.request.db.query(World).get
-    worlds = [get(rp()).serialize() for _ in xrange(num_queries)]
+    worlds = [get(rp()).serialize() for _ in range(num_queries)]
     return worlds
     return worlds
 
 
   @cherrypy.expose
   @cherrypy.expose
@@ -85,7 +85,7 @@ class CherryPyBenchmark(object):
 
 
     worlds = []
     worlds = []
     rp = partial(randint, 1, 10000)
     rp = partial(randint, 1, 10000)
-    ids = [rp() for _ in xrange(num_queries)]
+    ids = [rp() for _ in range(num_queries)]
     ids.sort() # To avoid deadlock
     ids.sort() # To avoid deadlock
     for id in ids:
     for id in ids:
       world = cherrypy.request.db.query(World).get(id)
       world = cherrypy.request.db.query(World).get(id)