Reorganize trailing comma code a bit.
- Split out syntax error tests. - Avoid redundant handling of empty literals.
This commit is contained in:
+4
-2
@@ -230,8 +230,10 @@ class Test:
|
||||
index += 1
|
||||
|
||||
|
||||
def fail(self, message, *args, **kwargs):
|
||||
self.failures.append(message.format(*args, **kwargs))
|
||||
def fail(self, message, *args):
|
||||
if args:
|
||||
message = message.format(*args)
|
||||
self.failures.append(message)
|
||||
|
||||
|
||||
def color_text(text, color):
|
||||
|
||||
Reference in New Issue
Block a user