Skip to content

Commit

Permalink
tests: mind the additional packages
Browse files Browse the repository at this point in the history
  • Loading branch information
adbar committed Jan 24, 2022
1 parent 188f06c commit 3b92db6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ jobs:
# coverage
- name: Upload coverage to Codecov
if: ${{ matrix.env.MINIMAL == 'false'}}
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
Expand Down
5 changes: 3 additions & 2 deletions tests/unit_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,9 @@ def test_filters():
assert check_html_lang(html.fromstring('<html><body></body></html>'), target_language='en') is True
# text + lang
my_p = '<p>In sleep a king, but waking no such matter.</p>'
assert extract(html.fromstring('<html lang="en-US"><body>' + my_p*50 + '</body></html>'), target_language='en') is not None
assert extract(html.fromstring('<html lang="en-US"><body>' + my_p*50 + '</body></html>'), target_language='de') is None
if LANGID_FLAG is True:
assert extract(html.fromstring('<html lang="en-US"><body>' + my_p*50 + '</body></html>'), target_language='en') is not None
assert extract(html.fromstring('<html lang="en-US"><body>' + my_p*50 + '</body></html>'), target_language='de') is None
assert check_html_lang(html.fromstring('<html lang="de_DE, en_US"><body></body></html>'), target_language='de') is True
assert check_html_lang(html.fromstring('<html lang="de_DE, en_US"><body></body></html>'), target_language='en') is True
assert check_html_lang(html.fromstring('<html lang="de_DE, en_US"><body></body></html>'), target_language='de', strict=True) is True
Expand Down

0 comments on commit 3b92db6

Please sign in to comment.