mirror of
https://github.com/matomo-org/matomo-icons.git
synced 2024-09-19 17:03:45 +02:00
add urlparser to test
This commit is contained in:
parent
1aaed399da
commit
773b44c087
4 changed files with 6 additions and 2 deletions
BIN
dist/searchEngines/apollo.lv.png
vendored
Normal file
BIN
dist/searchEngines/apollo.lv.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 370 B |
BIN
src/searchEngines/apollo.lv.png
Normal file
BIN
src/searchEngines/apollo.lv.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 664 B |
|
@ -1 +0,0 @@
|
|||
../brand/Google.svg
|
7
tests.py
7
tests.py
|
@ -12,6 +12,7 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
import json
|
||||
import sys
|
||||
from glob import glob
|
||||
|
||||
|
@ -20,6 +21,8 @@ import os
|
|||
import re
|
||||
import yaml
|
||||
from PIL import Image
|
||||
from subprocess import Popen, PIPE
|
||||
from urllib.parse import urlparse
|
||||
|
||||
ignored_source_files = [
|
||||
"src/flags/un.svg",
|
||||
|
@ -185,7 +188,8 @@ def look_for_search_and_social_icon(source, mode, outputdir):
|
|||
urls = search_engine["urls"]
|
||||
else:
|
||||
urls = element
|
||||
url = next((url for url in urls if "{}" not in url and "/" not in url), False)
|
||||
url = next((url for url in urls if "{}" not in url), False)
|
||||
url = urlparse("https://" + url).netloc
|
||||
|
||||
if url and not image_exists(outputdir + url):
|
||||
print("icon for {icon} is missing".format(icon=url))
|
||||
|
@ -215,6 +219,7 @@ if __name__ == "__main__":
|
|||
test_if_all_symlinks_are_valid()
|
||||
test_if_placeholder_icon_exist()
|
||||
test_if_dist_icons_are_square()
|
||||
test_if_there_are_icons_for_all_device_detector_categories()
|
||||
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