Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix yoda conditions #793

Merged
merged 1 commit into from
Nov 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tests/masonry/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,13 @@ def test_prepare_metadata_for_build_wheel(project: str) -> None:
assert (dist_info / "METADATA").exists()

with (dist_info / "entry_points.txt").open(encoding="utf-8") as f:
assert entry_points == f.read()
assert f.read() == entry_points

with (dist_info / "WHEEL").open(encoding="utf-8") as f:
assert wheel_data == f.read()
assert f.read() == wheel_data

with (dist_info / "METADATA").open(encoding="utf-8") as f:
assert metadata == f.read()
assert f.read() == metadata


def test_prepare_metadata_for_build_wheel_with_bad_path_dev_dep_succeeds() -> None:
Expand Down Expand Up @@ -240,7 +240,7 @@ def test_build_editable_wheel(project: str) -> None:
namelist = z.namelist()

assert "my_package.pth" in namelist
assert pkg_dir.as_posix() == z.read("my_package.pth").decode().strip()
assert z.read("my_package.pth").decode().strip() == pkg_dir.as_posix()


@pytest.mark.parametrize("project", ["complete", "complete_new"])
Expand Down Expand Up @@ -299,5 +299,5 @@ def test_build_editable_wheel_with_metadata_directory(project: str) -> None:
namelist = z.namelist()

assert "my_package.pth" in namelist
assert pkg_dir.as_posix() == z.read("my_package.pth").decode().strip()
assert z.read("my_package.pth").decode().strip() == pkg_dir.as_posix()
assert f"{metadata_directory}/CUSTOM" in namelist
Loading