diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cb541c9..dab9adb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -54,10 +54,8 @@ jobs: test: strategy: matrix: - os: [ ubuntu-latest ] - python: [ " 3.9" ] - #os: [ ubuntu-latest, macOS-latest, windows-latest ] - #python: [" 3.9", "3.10", "3.11", "3.12", "3.13" ] + os: [ ubuntu-latest, macOS-latest, windows-latest ] + python: [" 3.9", "3.10", "3.11", "3.12", "3.13" ] runs-on: ${{ matrix.os }} timeout-minutes: 20 steps: diff --git a/kreuzberg/_string.py b/kreuzberg/_string.py index c1c2a69..1baede4 100644 --- a/kreuzberg/_string.py +++ b/kreuzberg/_string.py @@ -22,7 +22,7 @@ def safe_decode(byte_data: bytes, encoding: str | None = None) -> str: encodings = [encoding, detect(byte_data).get("encoding", ""), "utf-8"] for enc in [e for e in encodings if e]: # pragma: no cover - with suppress(UnicodeDecodeError): + with suppress(UnicodeDecodeError, LookupError): return byte_data.decode(enc) # If all encodings fail, fall back to latin-1 which can handle any byte diff --git a/tests/conftest.py b/tests/conftest.py index df4ba19..d3acc1b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -5,12 +5,6 @@ import pytest -@pytest.fixture -def anyio_backend() -> str: - """override anyio to test only against asyncio""" - return "asyncio" - - @pytest.fixture(scope="session") def searchable_pdf() -> Path: return Path(__file__).parent / "source" / "searchable.pdf"