Skip to content

Commit 9dcd89e

Browse files
authored
Handle changed apply method. (#773)
1 parent 4f0051f commit 9dcd89e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

test/show_templates.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
print("\tExample ", example)
6363
print("\t--------")
6464
output = template.apply(example)
65-
if output[0].strip() == "" or (len(output) > 1 and output[1].strip() == ""):
65+
if output[0].strip() == "" or (len(output) > 1 and output[1][0].strip() == ""):
6666
print("\t Blank result")
6767
continue
6868

@@ -73,8 +73,12 @@
7373
print("\t", line.replace("\n", "\n\t"))
7474
print()
7575
print("\tY")
76-
for line in textwrap.wrap(yp, width=width, replace_whitespace=False):
77-
print("\t", line.replace("\n", "\n\t"))
76+
for i, y in enumerate(yp):
77+
if i > 0:
78+
print()
79+
print("\tY")
80+
for line in textwrap.wrap(y, width=width, replace_whitespace=False):
81+
print("\t", line.replace("\n", "\n\t"))
7882

7983
print_counter += 1
8084
if print_counter >= 10:

0 commit comments

Comments
 (0)