summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElvis Pranskevichus <elvis@magic.io>2018-03-30 20:07:34 -0400
committerElvis Pranskevichus <elvis@magic.io>2018-03-30 20:50:17 -0400
commit0e715340a78863d973302981ab98b232d6f51735 (patch)
treefb3606cf37c2e6c877bd4a4733909fe955dbf696
parent9d59078489dc834d2afe4242bef30c88b739f14d (diff)
downloadimmutables-0e715340a78863d973302981ab98b232d6f51735.tar.gz
immutables-0e715340a78863d973302981ab98b232d6f51735.zip
Do not use f-strings for Python 3.5 compatibility
-rw-r--r--tests/test_map.py8
1 files 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'<Key name:{self.name} hash:{self.hash}>'
+ return '<Key name:{} hash:{}>'.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')