Skip to content

Drop py dependency from test code#98

Merged
nicoddemus merged 1 commit into
pytest-dev:mainfrom
florczakraf:86-drop-py-from-test-code
Apr 14, 2026
Merged

Drop py dependency from test code#98
nicoddemus merged 1 commit into
pytest-dev:mainfrom
florczakraf:86-drop-py-from-test-code

Conversation

@florczakraf

Copy link
Copy Markdown
Contributor

Issue #86 asked for a removal of the legacy py library dependency.
This change implements a minimal replacement for py.code.Source that
we can use to deindent the inlined Python source code embedded in the
pytest-random-order's own tests.

Thanks for maintaining the plugin that helped me debug flaky tests
on countless occasions!

Closes #86

Issue pytest-dev#86 asked for a removal of the legacy `py` library dependency.
This change implements a minimal replacement for py.code.Source that
we can use to deindent the inlined Python source code embedded in the
pytest-random-order's own tests.

@nicoddemus nicoddemus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@nicoddemus nicoddemus merged commit 43ee958 into pytest-dev:main Apr 14, 2026
12 checks passed
@a-detiste

Copy link
Copy Markdown
Contributor

thanks

@a-detiste

Copy link
Copy Markdown
Contributor

@florczakraf @nicoddemus even shorter is using textwrap.dedent() from the standard library

@florczakraf

florczakraf commented Apr 15, 2026

Copy link
Copy Markdown
Contributor Author

TIL! I'll submit a follow-up to simplify this NVM, you've already did #99

@a-detiste

Copy link
Copy Markdown
Contributor

TIL! I'll submit a follow-up to simplify this NVM, you've already did #99

I learned that today too by accident looking elsewhere.

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.

original py is not maintained anymore

3 participants