diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-05-25 03:19:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-05-25 03:19:09 +0300 |
commit | a713e9c8cb4aa19b459364781821c54ac4b61cee (patch) | |
tree | 93542f8e4f25c6fda1bb040371fad407f99ca8f3 /testxml | |
parent | c0735c8fb47391632da0904bbbad064b0d2f7b64 (diff) | |
download | evol-tools-a713e9c8cb4aa19b459364781821c54ac4b61cee.tar.gz evol-tools-a713e9c8cb4aa19b459364781821c54ac4b61cee.tar.bz2 evol-tools-a713e9c8cb4aa19b459364781821c54ac4b61cee.tar.xz evol-tools-a713e9c8cb4aa19b459364781821c54ac4b61cee.zip |
testxml: fix unisex gender.
Diffstat (limited to 'testxml')
-rwxr-xr-x | testxml/testxml.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/testxml/testxml.py b/testxml/testxml.py index 606024f..42ab57d 100755 --- a/testxml/testxml.py +++ b/testxml/testxml.py @@ -315,6 +315,7 @@ def testSprites(id, node, checkGender, isNormalDye, iserr): else: male = False female = False + unisex = False for sprite in sprites: file = sprite.childNodes[0].data if checkGender: @@ -331,21 +332,22 @@ def testSprites(id, node, checkGender, isNormalDye, iserr): showMsg(id, "double female sprite tag", "", iserr) female = True elif gender == "unisex": - if female == True or male == True: - showMsg(id, "gender sprite tag with unisex tag", "", False) - male = True - female = True + unisex = True try: variant = int(sprite.attributes["variant"].value) except: variant = 0 testSprite(id, file, variant, isNormalDye, iserr) if checkGender: - if male == False: + if male == False and unisex == False: showMsg(id, "no male sprite tag", "",iserr) - if female == False: + if female == False and unisex == False: showMsg(id, "no female sprite tag", "", iserr) - + if unisex == True and female == True and male == True: + showMsg(id, "gender sprite tag with unisex tag", "", iserr) + if unisex == False and male == False and female == False: + showMsg(id, "no any gender tags", "", iserr) + def testSprite(id, file, variant, isNormalDye, iserr): global safeDye |