From 3b92db6938412bdd989e5ac125b33dc99e70ed75 Mon Sep 17 00:00:00 2001 From: Adrien Barbaresi Date: Mon, 24 Jan 2022 18:55:24 +0100 Subject: [PATCH] tests: mind the additional packages --- .github/workflows/tests.yml | 1 + tests/unit_tests.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 914be402..c866c255 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 diff --git a/tests/unit_tests.py b/tests/unit_tests.py index ee93f1db..517f0e79 100644 --- a/tests/unit_tests.py +++ b/tests/unit_tests.py @@ -383,8 +383,9 @@ def test_filters(): assert check_html_lang(html.fromstring(''), target_language='en') is True # text + lang my_p = '

In sleep a king, but waking no such matter.

' - assert extract(html.fromstring('' + my_p*50 + ''), target_language='en') is not None - assert extract(html.fromstring('' + my_p*50 + ''), target_language='de') is None + if LANGID_FLAG is True: + assert extract(html.fromstring('' + my_p*50 + ''), target_language='en') is not None + assert extract(html.fromstring('' + my_p*50 + ''), target_language='de') is None assert check_html_lang(html.fromstring(''), target_language='de') is True assert check_html_lang(html.fromstring(''), target_language='en') is True assert check_html_lang(html.fromstring(''), target_language='de', strict=True) is True