diff --git a/tests/test_adresse.py b/tests/test_adresse.py index d0b2f547d..038cb1b6e 100644 --- a/tests/test_adresse.py +++ b/tests/test_adresse.py @@ -1,7 +1,7 @@ +from pathlib import Path from typing import Dict, Optional import pytest -from py._path.local import LocalPath # type:ignore[import] from pydantic import ValidationError from bo4e.com.adresse import Adresse @@ -120,7 +120,7 @@ def test_deserialization(self) -> None: assert a.landescode is Landescode.AT # type: ignore[attr-defined] @pytest.mark.datafiles("./tests/test_data/test_data_adresse/test_data_adresse_missing_plz.json") - def test_missing_required_attribute(self, datafiles: LocalPath) -> None: + def test_missing_required_attribute(self, datafiles: Path) -> None: """ Test for getting an error message if a required attribute is missing """ diff --git a/tests/test_geschaeftspartner.py b/tests/test_geschaeftspartner.py index 409bd7d3c..c0c4a5cf1 100644 --- a/tests/test_geschaeftspartner.py +++ b/tests/test_geschaeftspartner.py @@ -1,7 +1,7 @@ import json +from pathlib import Path import pytest -from py._path.local import LocalPath # type:ignore[import] from pydantic import ValidationError from bo4e.bo.geschaeftspartner import Geschaeftspartner @@ -15,7 +15,7 @@ class TestGeschaeftspartner: @pytest.mark.datafiles("./tests/test_data/test_data_adresse/test_data_adresse_only_required_fields.json") - def test_serializable(self, datafiles: LocalPath) -> None: + def test_serializable(self, datafiles: Path) -> None: with open(datafiles / "test_data_adresse_only_required_fields.json", encoding="utf-8") as json_file: address_test_data = json.load(json_file)