From 9d8522f98a2c9c5de4f7c267f0ca0618b185a874 Mon Sep 17 00:00:00 2001 From: Lukas Winkler Date: Mon, 15 May 2017 21:21:39 +0200 Subject: [PATCH] add test if icons are square Not enabled until remaining icons are fixedt: --- tests.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests.py b/tests.py index 8af6ee0..63b4247 100755 --- a/tests.py +++ b/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)")