You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building from a source distribution (e.g., when creating a system package) it is preferable to run the tests on the built code. This requires the tests to be included in the source distribution.
I haven't used poetry before, but I had a play with it and couldn't find a nice way to include them:
You can use packages = [{ include = "quaternion" }, { include = "tests", format = "sdist" }] in the [tool.poetry] section of pyproject.toml which includes the tests directory in the source distribution, but treats it as another package, i.e., the generated setup.py would also install the tests as a package, which is certainly not ideal.
Add support of inline tables in include on pyproject.toml. python-poetry/poetry-core#6 adds similar format= filtering to includes; it has been accepted but doesn't seem to have been released yet (at least, the Poetry version 1.0.10 I have installed doesn't support it). I think this will allow something like include = [{path = "tests/*", format = "sdist"}] once its available.
For now, the archive generated by GitHub is sufficient, but once there is sufficient poetry support it would be nice to have the tests in all source distributions.
When building from a source distribution (e.g., when creating a system package) it is preferable to run the tests on the built code. This requires the tests to be included in the source distribution.
I haven't used poetry before, but I had a play with it and couldn't find a nice way to include them:
You can use
packages = [{ include = "quaternion" }, { include = "tests", format = "sdist" }]in the[tool.poetry]section of pyproject.toml which includes the tests directory in the source distribution, but treats it as another package, i.e., the generated setup.py would also install the tests as a package, which is certainly not ideal.Add support of inline tables in include on pyproject.toml. python-poetry/poetry-core#6 adds similar
format=filtering to includes; it has been accepted but doesn't seem to have been released yet (at least, the Poetry version 1.0.10 I have installed doesn't support it). I think this will allow something likeinclude = [{path = "tests/*", format = "sdist"}]once its available.For now, the archive generated by GitHub is sufficient, but once there is sufficient poetry support it would be nice to have the tests in all source distributions.