Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
radoering committed Sep 7, 2024
1 parent b3517a3 commit c1e12b4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/masonry/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pytest

from poetry.core.masonry.metadata import Metadata
from poetry.core.packages.package import Package
from poetry.core.packages.project_package import ProjectPackage


if TYPE_CHECKING:
Expand All @@ -17,7 +17,7 @@ def test_from_package_readme(tmp_path: Path) -> None:
readme_path = tmp_path / "README.md"
readme_path.write_text("This is a description\néöß", encoding="utf-8")

package = Package("foo", "1.0")
package = ProjectPackage("foo", "1.0")
package.readmes = (readme_path,)

metadata = Metadata.from_package(package)
Expand All @@ -32,7 +32,7 @@ def test_from_package_multiple_readmes(tmp_path: Path) -> None:
readme_path2 = tmp_path / "README2.md"
readme_path2.write_text("Description 2", encoding="utf-8")

package = Package("foo", "1.0")
package = ProjectPackage("foo", "1.0")
package.readmes = (readme_path1, readme_path2)

metadata = Metadata.from_package(package)
Expand All @@ -51,7 +51,7 @@ def test_from_package_multiple_readmes(tmp_path: Path) -> None:
def test_from_package_readme_issues(
mocker: MockerFixture, exception: type[OSError], message: str
) -> None:
package = Package("foo", "1.0")
package = ProjectPackage("foo", "1.0")
package.readmes = (Path("MyReadme.md"),)

mocker.patch("pathlib.Path.read_text", side_effect=exception)
Expand Down

0 comments on commit c1e12b4

Please sign in to comment.