File: test_pyproject_purelib.py

package info (click to toggle)
scikit-build-core 0.11.1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,408 kB
  • sloc: python: 13,380; ansic: 140; cpp: 134; sh: 27; fortran: 18; makefile: 7
file content (22 lines) | stat: -rw-r--r-- 587 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from pathlib import Path

import pytest

from scikit_build_core.build import build_wheel


@pytest.mark.compile
@pytest.mark.configure
@pytest.mark.usefixtures("package_simple_purelib_package")
def test_pep517_wheel(virtualenv, tmp_path: Path):
    dist = tmp_path / "dist"
    out = build_wheel(str(dist), {})
    (wheel,) = dist.glob("purelib_example-0.0.1-*-none-any.whl")
    assert wheel == dist / out

    virtualenv.install(wheel)

    version = virtualenv.execute(
        "import purelib_example; print(purelib_example.__version__)",
    )
    assert version.strip() == "1.2.3"