Skip to content

Commit

Permalink
tests: fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii committed Sep 27, 2024
1 parent 452ddc7 commit 0a967a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,18 @@ def build(session: nox.Session) -> None:
@nox.parametrize("example", EXAMPLES, ids=EXAMPLES)
def test_doc_examples(session: nox.Session, example: str) -> None:
_prepare_cmake_ninja(session)
session.install("-e.")
session.install("-e.", "pip")
session.chdir(f"docs/examples/{example}")
reqs = nox.project.load_toml("pyproject.toml")["build-system"]["requires"]
session.install(*reqs, "pytest")
freqs = (r for r in reqs if "scikit-build-core" not in r.replace("_", "-"))
session.install(*freqs, "pytest")
session.install(
".",
"--no-build-isolation",
"--config-settings=cmake.verbose=true",
env={"PYTHONWARNINGS": "error"},
)
session.run("pip", "list")
if Path("../test.py").is_file():
session.run("python", "../test.py")
else:
Expand Down
2 changes: 2 additions & 0 deletions tests/test_pyproject_pep518.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def test_pep518_sdist(isolated, package_simple_pyproject_ext):
Requires-Python: >=3.7
Provides-Extra: test
Requires-Dist: pytest>=6.0; extra == "test"
"""
)

Expand Down Expand Up @@ -76,6 +77,7 @@ def test_pep518_sdist_with_cmake_config(isolated, cleanup_overwrite):
Metadata-Version: 2.1
Name: sdist_config
Version: 0.1.0
"""
)

Expand Down

0 comments on commit 0a967a3

Please sign in to comment.