Skip to content

Commit

Permalink
[Test] add "empty" test package with no configuration in config file
Browse files Browse the repository at this point in the history
  • Loading branch information
tttapa committed Feb 3, 2025
1 parent ff6826a commit d4457a1
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 2 deletions.
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@

examples = "minimal-program", "pybind11-project", "nanobind-project"
examples += "swig-project", "minimal"
test_packages = "namespace-project-a", "namespace-project-b"
test_packages = "empty-config", "namespace-project-a", "namespace-project-b"
test_packages += "bare-c-module", "cmake-preset", "cmake-options"

purity = {"namespace-project-b": True}
purity = {"empty-config": True, "namespace-project-b": True}


def get_platform():
Expand Down
Empty file.
3 changes: 3 additions & 0 deletions test-packages/empty-config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Empty config

No options beyond metadata in pyproject.toml.
11 changes: 11 additions & 0 deletions test-packages/empty-config/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[project]
name = "empty-config"
readme = "README.md"
requires-python = ">=3.7"
license = { "file" = "LICENSE" }
authors = [{ "name" = "Pieter P", "email" = "[email protected]" }]
dynamic = ["version", "description"]

[build-system]
requires = ["py-build-cmake~=0.4.0a1.dev0"]
build-backend = "py_build_cmake.build"
9 changes: 9 additions & 0 deletions test-packages/empty-config/src/empty_config/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"""
Empty config
"""

__version__ = "0.4.0a1.dev0"


def add(a, b):
return a + b
5 changes: 5 additions & 0 deletions test-packages/empty-config/tests/test_empty.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from empty_config import add


def test_add():
assert add(1, 2) == 3
5 changes: 5 additions & 0 deletions tests/expected_contents/empty-config/sdist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
empty_config-{{version}}/LICENSE
empty_config-{{version}}/PKG-INFO
empty_config-{{version}}/README.md
empty_config-{{version}}/pyproject.toml
empty_config-{{version}}/src/empty_config/__init__.py
6 changes: 6 additions & 0 deletions tests/expected_contents/empty-config/whl.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
empty_config-{{version}}.dist-info/LICENSE
empty_config-{{version}}.dist-info/METADATA
empty_config-{{version}}.dist-info/RECORD
empty_config-{{version}}.dist-info/WHEEL
empty_config-{{version}}.dist-info/entry_points.txt
empty_config/__init__.py

0 comments on commit d4457a1

Please sign in to comment.