mirror of
https://github.com/matomo-org/matomo-icons.git
synced 2024-09-19 17:03:45 +02:00
add test if icons are square
Not enabled until remaining icons are fixedt:
This commit is contained in:
parent
680712a372
commit
9d8522f98a
1 changed files with 10 additions and 0 deletions
10
tests.py
10
tests.py
|
@ -108,6 +108,15 @@ def test_if_icons_are_large_enough():
|
|||
) + "Maybe try to find an PNG or SVG from another source.")
|
||||
|
||||
|
||||
def test_if_dist_icons_are_square():
|
||||
global error
|
||||
for file in glob("dist/**/*.png"):
|
||||
if "flags" not in file:
|
||||
im = Image.open(file)
|
||||
if im.size[0] != im.size[1]:
|
||||
print("{file} isn't square ({width}x{height})".format(file=file, width=im.size[0], height=im.size[1]))
|
||||
# error = True # TODO: Enable if non square icons are fixed
|
||||
|
||||
if __name__ == "__main__":
|
||||
error = False
|
||||
|
||||
|
@ -117,6 +126,7 @@ if __name__ == "__main__":
|
|||
test_if_source_for_images()
|
||||
test_if_all_symlinks_are_valid()
|
||||
test_if_placeholder_icon_exist()
|
||||
test_if_dist_icons_are_square()
|
||||
if "TRAVIS" in os.environ and os.environ["TRAVIS"]: # collapse on travis
|
||||
print("travis_fold:start:small_icons")
|
||||
print("improvable icons: (click to expand)")
|
||||
|
|
Loading…
Reference in a new issue