From 244372205e350f1431a124f6ee8d69e82dee5f07 Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Thu, 2 Feb 2023 13:51:45 +0000 Subject: [PATCH] Include the unit tests in the source distribution As requested in #631 and also #1349; this change should cause the tests (and also the examples from the docs directory which get pulled into the tests) to be pulled into the sdist. With this change I can: - `poetry build` - Grab and extract the resulting tarball - `poetry install --extras dev` inside the resulting directory - `poetry run pytest -vv tests` inside the resulting directory As I understand the request, I think this should provide everything necessary. NOTE: We have spoken about rolling the CLI tools into snapshot tests too, so if that happens we should remember to make sure that the pipeline outlined above still works fine. --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9582f1550..6d283c933 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,9 @@ classifiers = [ "Typing :: Typed", ] include = [ - "src/textual/py.typed" + "src/textual/py.typed", + { path = "docs/examples", format = "sdist" }, + { path = "tests", format = "sdist" } ] [tool.poetry.scripts]