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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user