Commit 1e97d453 authored by Wolfgang Rohdewald's avatar Wolfgang Rohdewald
Browse files

kajonggtest: say if no difference in kajongg.csv was found

parent 50e83c78
......@@ -409,6 +409,7 @@ class CSV(StrMixin):
def evaluate(self):
"""evaluate the data. Show differences as helpful as possible"""
found_difference = False
for ruleset, aiVariant, game in {(x.ruleset, x.aiVariant, x.game) for x in self.rows}:
rows = list(reversed(sorted(
x for x in self.rows
......@@ -417,8 +418,12 @@ class CSV(StrMixin):
for fixedValue in set(x[fixedField] for x in rows):
checkRows = [x for x in rows if x[fixedField] == fixedValue]
for warned in self.compareRows(checkRows):
found_difference = True
rows.remove(warned)
found_difference |= len(self.compareRows(rows)) > 0
self.compareRows(rows)
if not found_difference:
print('found no differences in {}'.format(OPTIONS.csv))
@staticmethod
def compareRows(rows):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment