Patchwork [1,of,6,chg-test] run-tests: do not compare bytes with str while ordering tests

login
register
mail settings
Submitter Yuya Nishihara
Date Feb. 12, 2016, 4:12 p.m.
Message ID <8ffb546b8ae698d91f34.1455293554@mimosa>
Download mbox | patch
Permalink /patch/13138/
State Accepted
Headers show

Comments

Yuya Nishihara - Feb. 12, 2016, 4:12 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1454827982 -32400
#      Sun Feb 07 15:53:02 2016 +0900
# Node ID 8ffb546b8ae698d91f34db6a933c32883f702e66
# Parent  9bebf3fc158929e279654c45a734496fcbf996a8
run-tests: do not compare bytes with str while ordering tests

It failed on Python 3.

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1881,7 +1881,7 @@  class TestRunner(object):
                     for kw, mul in slow.items():
                         if kw in f:
                             val *= mul
-                    if f.endswith('.py'):
+                    if f.endswith(b'.py'):
                         val /= 10.0
                     perf[f] = val / 1000.0
                     return perf[f]