]> granicus.if.org Git - python/commitdiff
test_hash: Fix a BytesWarning in get_hash_command()
authorVictor Stinner <victor.stinner@gmail.com>
Sat, 1 Feb 2014 03:26:46 +0000 (04:26 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Sat, 1 Feb 2014 03:26:46 +0000 (04:26 +0100)
Lib/test/test_hash.py

index 3d2859fdd0db58f3d1b87f91ed9e6ba6377392f1..69c169fc6c9585749d6b0f3de385ebe33d60a8a7 100644 (file)
@@ -172,7 +172,7 @@ class HashRandomizationTests:
     # an object to be tested
 
     def get_hash_command(self, repr_):
-        return 'print(hash(eval(%s.decode("utf-8"))))' % repr_.encode("utf-8")
+        return 'print(hash(eval(%r.decode("utf-8"))))' % repr_.encode("utf-8")
 
     def get_hash(self, repr_, seed=None):
         env = os.environ.copy()