1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-02 17:20:25 +02:00

* Skip tidy check if html5print is not available

* install test dependencies on arch
This commit is contained in:
Benedikt Brückmann 2021-02-08 06:37:44 +01:00
parent d5a90ed60e
commit b1bde9e407
2 changed files with 7 additions and 2 deletions

View File

@ -138,7 +138,7 @@ arch_pip_install:
- master@fdroid/fdroidserver - master@fdroid/fdroidserver
script: script:
- pacman --sync --sysupgrade --refresh --noconfirm git grep python-pip python-virtualenv tar - pacman --sync --sysupgrade --refresh --noconfirm git grep python-pip python-virtualenv tar
- pip install -e . - pip install -e .[test]
- fdroid - fdroid
- fdroid readmeta - fdroid readmeta
- fdroid update --help - fdroid update --help

View File

@ -13,7 +13,6 @@ import requests
import tempfile import tempfile
import json import json
import shutil import shutil
from html5print import CSSBeautifier, HTMLBeautifier
localmodule = os.path.realpath( localmodule = os.path.realpath(
os.path.join(os.path.dirname(inspect.getfile(inspect.currentframe())), '..')) os.path.join(os.path.dirname(inspect.getfile(inspect.currentframe())), '..'))
@ -378,6 +377,12 @@ class IndexTest(unittest.TestCase):
self.assertTrue(os.path.exists(os.path.join('repo', 'index.css'))) self.assertTrue(os.path.exists(os.path.join('repo', 'index.css')))
self.assertTrue(os.path.exists(os.path.join('repo', 'index.png'))) self.assertTrue(os.path.exists(os.path.join('repo', 'index.png')))
try:
from html5print import CSSBeautifier, HTMLBeautifier
except ImportError:
print('WARNING: skipping rest of test since androguard is missing!')
return
with open(os.path.join("repo", "index.html")) as f: with open(os.path.join("repo", "index.html")) as f:
html = f.read() html = f.read()
pretty_html = HTMLBeautifier.beautify(html) pretty_html = HTMLBeautifier.beautify(html)