pypa / pypa/packaging.python.org

`test` vs. `tests`

Open Beginner friendly
#1,165 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component: guides component: tutorials type: enhancement type: task
Dominant language
Python
Stars
1.7k
Forks
1.7k
Avg merge
3d 12h
Merged PRs (30d)
4

Description

Should tests live in directory test or tests? The guide seems inconsistent to me, but I'm new to contemporary Python packaging, so I may have missed something.

It is test in guides/using-manifest-in.rst:

How files are included in an sdist

The following files are included in a source distribution by default:

  • ...
  • all files matching the pattern test/test*.py

and tests in tutorials/packaging-projects.rst:

Creating a test directory

tests/ is a placeholder for test files. Leave it empty for now.

Is tests always the expected name for the directory containing tests? Could/should the guide standardize on that?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read guides/using-manifest-in.rst and tutorials/packaging-projects.rst, comparing how each describes the test directory name. Check the surrounding packaging guidance before deciding whether the terminology should be standardized. Done means the documentation gives consistent, unambiguous guidance about naming the directory containing tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.