From 0e715340a78863d973302981ab98b232d6f51735 Mon Sep 17 00:00:00 2001 From: Elvis Pranskevichus Date: Fri, 30 Mar 2018 20:07:34 -0400 Subject: Do not use f-strings for Python 3.5 compatibility --- tests/test_map.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_map.py b/tests/test_map.py index fdb6963..a17e005 100644 --- a/tests/test_map.py +++ b/tests/test_map.py @@ -16,7 +16,7 @@ class HashKey: self.error_on_eq_to = error_on_eq_to def __repr__(self): - return f'' + return ''.format(self.name, self.hash) def __hash__(self): if self._crasher is not None and self._crasher.error_on_hash: @@ -32,9 +32,9 @@ class HashKey: raise EqError if self.error_on_eq_to is not None and self.error_on_eq_to is other: - raise ValueError(f'cannot compare {self!r} to {other!r}') + raise ValueError('cannot compare {!r} to {!r}'.format(self, other)) if other.error_on_eq_to is not None and other.error_on_eq_to is self: - raise ValueError(f'cannot compare {other!r} to {self!r}') + raise ValueError('cannot compare {!r} to {!r}'.format(other, self)) return (self.name, self.hash) == (other.name, other.hash) @@ -449,7 +449,7 @@ class MapTest(unittest.TestCase): for i in range(17): key = HashKey(i, str(i)) keys.append(key) - h = h.set(key, f'val-{i}') + h = h.set(key, 'val-{}'.format(i)) collision_key16 = HashKey(16, '18') h = h.set(collision_key16, 'collision') -- cgit v1.2.3