tests/basics: Use str.format instead of % for formatting messages.

Only use % formatting when testing % itself, because only str.format is
guaranteed to be available on any port.
This commit is contained in:
Damien George
2019-10-18 19:18:06 +11:00
parent 4847460232
commit 709136e844
5 changed files with 6 additions and 6 deletions

View File

@@ -11,7 +11,7 @@ class C:
self.value = value
def __str__(self):
return "C(%s)" % self.value
return "C({})".format(self.value)
def __add__(self, rhs):
print(self, '+', rhs)