Resolved merge issues
This commit is contained in:
parent
5f86e6f506
commit
ac3cb751a3
|
@ -1158,6 +1158,10 @@ class ReprEntry(TerminalRepr):
|
||||||
if is_failure_line:
|
if is_failure_line:
|
||||||
# from this point on all lines are considered part of the failure
|
# from this point on all lines are considered part of the failure
|
||||||
failure_lines.extend(self.lines[index:])
|
failure_lines.extend(self.lines[index:])
|
||||||
|
|
||||||
|
for line in self.lines[index:]:
|
||||||
|
print(line)
|
||||||
|
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
if self.style == "value":
|
if self.style == "value":
|
||||||
|
@ -1180,6 +1184,8 @@ class ReprEntry(TerminalRepr):
|
||||||
for line in failure_lines:
|
for line in failure_lines:
|
||||||
line_list = line.split()
|
line_list = line.split()
|
||||||
# multiline case seems to be an issue with just an added ','
|
# multiline case seems to be an issue with just an added ','
|
||||||
|
# print(line_list)
|
||||||
|
# These are edge cases for empty lists
|
||||||
if len(line_list) == 3 and line_list[2] == "," and line_list[1] == "-":
|
if len(line_list) == 3 and line_list[2] == "," and line_list[1] == "-":
|
||||||
line = line.replace(",", "[]")
|
line = line.replace(",", "[]")
|
||||||
# This is to remove the extra whitespace between '-' and '[]'
|
# This is to remove the extra whitespace between '-' and '[]'
|
||||||
|
@ -1187,6 +1193,14 @@ class ReprEntry(TerminalRepr):
|
||||||
extra_wp_i = line_list.index("-") + 1
|
extra_wp_i = line_list.index("-") + 1
|
||||||
line_list.pop(extra_wp_i)
|
line_list.pop(extra_wp_i)
|
||||||
line = "".join(line_list)
|
line = "".join(line_list)
|
||||||
|
elif len(line_list) == 3 and line_list[2] == "," and line_list[1] == "+":
|
||||||
|
line = line.replace(",", "[]")
|
||||||
|
# This is to remove the extra whitespace between '+' and '[]'
|
||||||
|
line_list = list(line)
|
||||||
|
extra_wp_i = line_list.index("+") + 1
|
||||||
|
line_list.pop(extra_wp_i)
|
||||||
|
line = "".join(line_list)
|
||||||
|
# print(line)
|
||||||
tw.line(line, bold=True, red=True)
|
tw.line(line, bold=True, red=True)
|
||||||
|
|
||||||
def toterminal(self, tw: TerminalWriter) -> None:
|
def toterminal(self, tw: TerminalWriter) -> None:
|
||||||
|
|
|
@ -14,9 +14,9 @@ def test2_():
|
||||||
"But we should not see the '- ,' appear"
|
"But we should not see the '- ,' appear"
|
||||||
"But rather we should see a '- []' appear"
|
"But rather we should see a '- []' appear"
|
||||||
]
|
]
|
||||||
assert m == []
|
assert [] == m
|
||||||
|
|
||||||
|
|
||||||
def test3_():
|
# def test3_():
|
||||||
m = ["This is some dummy test which shows the strange way in which Pycharm"]
|
# m = ["This is some dummy test which shows the strange way in which Pycharm"]
|
||||||
assert m == []
|
# assert m == []
|
||||||
|
|
Loading…
Reference in New Issue