Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Games
Kajongg
Commits
1e97d453
Commit
1e97d453
authored
Apr 06, 2021
by
Wolfgang Rohdewald
Browse files
kajonggtest: say if no difference in kajongg.csv was found
parent
50e83c78
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/kajonggtest.py
View file @
1e97d453
...
...
@@ -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
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment