diff --git a/tests/examples/setuptools/11-pyproject.toml b/tests/examples/setuptools/11-pyproject.toml new file mode 100644 index 0000000..df3e156 --- /dev/null +++ b/tests/examples/setuptools/11-pyproject.toml @@ -0,0 +1,4 @@ +[tool.setuptools] +ext-modules = [ + {name = "my.ext", sources = ["hello.c", "world.c"]} +] diff --git a/tests/examples/setuptools/12-pyproject.toml b/tests/examples/setuptools/12-pyproject.toml new file mode 100644 index 0000000..c7ad560 --- /dev/null +++ b/tests/examples/setuptools/12-pyproject.toml @@ -0,0 +1,3 @@ +[[tool.setuptools.ext-modules]] +name = "my.ext" +sources = ["hello.c", "world.c"] diff --git a/tests/invalid-examples/setuptools/ext-modules/invalid-field.errors.txt b/tests/invalid-examples/setuptools/ext-modules/invalid-field.errors.txt new file mode 100644 index 0000000..56887b3 --- /dev/null +++ b/tests/invalid-examples/setuptools/ext-modules/invalid-field.errors.txt @@ -0,0 +1 @@ +must not contain {'non-existing-field'} diff --git a/tests/invalid-examples/setuptools/ext-modules/invalid-field.toml b/tests/invalid-examples/setuptools/ext-modules/invalid-field.toml new file mode 100644 index 0000000..e8875ef --- /dev/null +++ b/tests/invalid-examples/setuptools/ext-modules/invalid-field.toml @@ -0,0 +1,4 @@ +[[tool.setuptools.ext-modules]] +name = "hello.world" +sources = ["hello.c"] +non-existing-field = "hello" diff --git a/tests/invalid-examples/setuptools/ext-modules/invalid-sources.errors.txt b/tests/invalid-examples/setuptools/ext-modules/invalid-sources.errors.txt new file mode 100644 index 0000000..48fba1a --- /dev/null +++ b/tests/invalid-examples/setuptools/ext-modules/invalid-sources.errors.txt @@ -0,0 +1 @@ +must be array diff --git a/tests/invalid-examples/setuptools/ext-modules/invalid-sources.toml b/tests/invalid-examples/setuptools/ext-modules/invalid-sources.toml new file mode 100644 index 0000000..6cc1678 --- /dev/null +++ b/tests/invalid-examples/setuptools/ext-modules/invalid-sources.toml @@ -0,0 +1,3 @@ +[[tool.setuptools.ext-modules]] +name = "hello.world" +sources = "hello.c" diff --git a/tests/invalid-examples/setuptools/ext-modules/missing-ext-name.errors.txt b/tests/invalid-examples/setuptools/ext-modules/missing-ext-name.errors.txt new file mode 100644 index 0000000..625a290 --- /dev/null +++ b/tests/invalid-examples/setuptools/ext-modules/missing-ext-name.errors.txt @@ -0,0 +1 @@ +must contain ['name'] diff --git a/tests/invalid-examples/setuptools/ext-modules/missing-ext-name.toml b/tests/invalid-examples/setuptools/ext-modules/missing-ext-name.toml new file mode 100644 index 0000000..83cab4a --- /dev/null +++ b/tests/invalid-examples/setuptools/ext-modules/missing-ext-name.toml @@ -0,0 +1,2 @@ +[[tool.setuptools.ext-modules]] +sources = ["hello.c", "world.c"]