Skip to content

fix: include tests in sdist - #1099

Merged
noahnu merged 1 commit into
syrupy-project:mainfrom
Lovlace777:lovelace/include-tests-in-sdist
May 31, 2026
Merged

fix: include tests in sdist#1099
noahnu merged 1 commit into
syrupy-project:mainfrom
Lovlace777:lovelace/include-tests-in-sdist

Conversation

@Lovlace777

Copy link
Copy Markdown
Contributor

Summary

  • Includes the test suite and root conftest.py in the source distribution.
  • Keeps the wheel contents unchanged.
  • Fixes the packaging gap reported in sdist is missing tests #1092 so downstream packagers can run tests from the sdist.

Validation

  • python -m hatchling build -t sdist -d ..\tmp\syrupy-baseline-sdist before the change showed 0 tests/ entries and no root conftest.py in the sdist.
  • python -m hatchling build -t sdist -d ..\tmp\syrupy-final-sdist passed after the change.
  • Tarball inspection after the change found 187 tests/ entries, root conftest.py, tests/conftest.py, and representative test files in the sdist.
  • python -X utf8 -m pytest tests -q passed: 376 passed, 60 xfailed, 6 xpassed.
  • git diff --check passed.

Notes

@noahnu

noahnu commented May 28, 2026

Copy link
Copy Markdown
Collaborator

I'm not too familiar with why it's valuable to add tests to the sdist. What's the use case?

Do we also need to ensure folks running these tests install the relevant test dependencies? Or is that something we put in the documentation?

@codecov

codecov Bot commented May 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1099   +/-   ##
=======================================
  Coverage   97.37%   97.37%           
=======================================
  Files          24       24           
  Lines        1717     1717           
=======================================
  Hits         1672     1672           
  Misses         45       45           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@noahnu noahnu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did some further research on this, I think it's fine

@noahnu
noahnu merged commit a4880a7 into syrupy-project:main May 31, 2026
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sdist is missing tests

2 participants