mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Skip the actions test on CI if html5-parser is too old
This commit is contained in:
parent
0d0c9c3f02
commit
cb263c1175
@ -13,8 +13,5 @@ file_to_patch=$(pacman -Ql python-pycryptodome | grep _raw_api.py$ | cut -d" " -
|
|||||||
echo "Patching $file_to_patch"
|
echo "Patching $file_to_patch"
|
||||||
sed -i 's/RTLD_DEEPBIND/RTLD_DEEPBIND_DISABLED_BY_KOVID/g' "$file_to_patch"
|
sed -i 's/RTLD_DEEPBIND/RTLD_DEEPBIND_DISABLED_BY_KOVID/g' "$file_to_patch"
|
||||||
|
|
||||||
# Needed till html5-parser 0.4.10 is available
|
|
||||||
pip install -U html5-parser
|
|
||||||
|
|
||||||
useradd -m ci
|
useradd -m ci
|
||||||
chown -R ci:users $GITHUB_WORKSPACE
|
chown -R ci:users $GITHUB_WORKSPACE
|
||||||
|
@ -470,6 +470,15 @@ def test(return_tests=False): # {{{
|
|||||||
self.ae(rule, next(iter(import_rules(export_rules([rule])))))
|
self.ae(rule, next(iter(import_rules(export_rules([rule])))))
|
||||||
|
|
||||||
def test_html_transform_actions(self):
|
def test_html_transform_actions(self):
|
||||||
|
try:
|
||||||
|
parse('a', fragment_context='div')
|
||||||
|
except TypeError:
|
||||||
|
import os
|
||||||
|
is_ci = os.environ.get('CI', '').lower() == 'true'
|
||||||
|
if is_ci:
|
||||||
|
raise unittest.SkipTest('html5-parser too old on CI')
|
||||||
|
else:
|
||||||
|
raise
|
||||||
|
|
||||||
def r(html='<p>hello'):
|
def r(html='<p>hello'):
|
||||||
return parse(namespace_elements=True, html=html)[1]
|
return parse(namespace_elements=True, html=html)[1]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user