Skip to content

image_encoding_speed_test.py broken with python 2 #52

@springmeyer

Description

@springmeyer

Looks like this broke in d2a2afa.

This seems to work in python 2:

diff --git a/test/python_tests/image_encoding_speed_test.py b/test/python_tests/image_encoding_speed_test.py
index 58f0785..251658f 100644
--- a/test/python_tests/image_encoding_speed_test.py
+++ b/test/python_tests/image_encoding_speed_test.py
@@ -6,7 +6,7 @@ from timeit import Timer, time

 import mapnik

-from .utilities import execution_path, run_all
+from utilities import execution_path, run_all


 def setup():
@@ -113,7 +113,7 @@ def do_encoding():
             t = Timer(aerial_24)
             run(aerial_24, aerial_24_im, c, t)

-    for key, value in sorted(sortable.iteritems(), key=lambda k, v: (v, k)):
+    for key, value in sorted(sortable.iteritems(), key=lambda (k, v): (v, k)):
         s = results[key]
         min_ = str(s[0])[:6]
         avg = str(s[1])[:6]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions