Skip to content

Expand the editable install tests and label test output - #659

Merged
edmorley merged 1 commit into
mainfrom
edmorley/editable-fixture-coverage
Nov 9, 2026
Merged

edmorley merged 1 commit into
mainfrom
edmorley/editable-fixture-coverage

Conversation

@edmorley

@edmorley edmorley commented Nov 9, 2026

Copy link
Copy Markdown
Member

Ports the applicable editable fixture improvements from the classic buildpack (heroku/heroku-buildpack-python#2155) to the CNB's pip_editable_git_compiled, poetry_editable_git_compiled and uv_editable_git_compiled fixtures and tests:

  • Every fixture now installs the current project in editable mode, using the package manager's default build backend and src layout. Previously only uv did, the pip fixture had only the VCS requirement, and the Poetry fixture used package-mode = false.
  • Each test now checks at launch-time that the project's entrypoint script is on PATH and runs from the app source directory (so the install really is editable), and that the compiled VCS package is imported from the expected location. Previously only the Poetry test checked anything at launch-time.
  • The extension.dist VCS dependency is updated from wheel 0.44.0 to 0.45.1 (the newest tag that still contains it), to match the classic fixtures.

The Poetry test now also expects the informational setuptools BuildBackendWarning that's emitted when installing the flat-layout VCS package in editable mode, since the new assertion continues past it (the old one ended just before it).

Unlike the classic buildpack, the CNB doesn't rewrite editable install paths (the build and launch paths are identical), so the classic fixtures' additional build backend/layout packages and path rewriting checks haven't been ported.

In addition:

  • The testing buildpack and launch-time check output is now labelled (for example Build-time env vars:, Python sys.path: and typing_extensions imported from: ...), so that the asserted output is easier to understand.
  • "run-time" in comments has been changed to "launch-time", to match the CNB spec's terminology, and the fixture and test comments have been made consistent.

GUS-W-24469384.

Ports the applicable editable fixture improvements from the classic
buildpack (heroku/heroku-buildpack-python#2155) to the CNB's
`pip_editable_git_compiled`, `poetry_editable_git_compiled` and
`uv_editable_git_compiled` fixtures and tests:

- Every fixture now installs the current project in editable mode,
  using the package manager's default build backend and src layout.
  Previously only uv did, the pip fixture had only the VCS requirement,
  and the Poetry fixture used `package-mode = false`.
- Each test now checks at launch-time that the project's entrypoint
  script is on `PATH` and runs from the app source directory (so the
  install really is editable), and that the compiled VCS package is
  imported from the expected location. Previously only the Poetry test
  checked anything at launch-time.
- The `extension.dist` VCS dependency is updated from wheel `0.44.0` to
  `0.45.1` (the newest tag that still contains it), to match the
  classic fixtures.

The Poetry test now also expects the informational setuptools
`BuildBackendWarning` that's emitted when installing the flat-layout
VCS package in editable mode, since the new assertion continues past
it (the old one ended just before it).

Unlike the classic buildpack, the CNB doesn't rewrite editable install
paths (the build and launch paths are identical), so the classic
fixtures' additional build backend/layout packages and path rewriting
checks haven't been ported.

In addition:
- The testing buildpack and launch-time check output is now labelled
  (for example `Build-time env vars:`, `Python sys.path:` and
  `typing_extensions imported from: ...`), so that the asserted output
  is easier to understand.
- "run-time" in comments has been changed to "launch-time", to match
  the CNB spec's terminology, and the fixture and test comments have
  been made consistent.

GUS-W-24469384.
@edmorley edmorley added the skip changelog Skip the check-changelog check label Nov 9, 2026
@edmorley edmorley self-assigned this Nov 9, 2026
@edmorley
edmorley marked this pull request as ready for review November 9, 2026 20:02
@edmorley
edmorley requested a review from a team as a code owner November 9, 2026 20:02
@edmorley
edmorley enabled auto-merge (squash) November 9, 2026 20:02
edmorley added a commit to heroku/heroku-buildpack-python that referenced this pull request Nov 9, 2026
Ports the test output labelling from the CNB
(heroku/buildpacks-python#659), so that the asserted output is easier
to understand. This covers the inline buildpack output in the `*_basic`
fixtures, the basic tests' `app.run` env var checks, and the paths
printed by the editable fixtures' `test-editable-installs.sh`.

The editable fixture and test comments have also been updated to match
the CNB's wording.

GUS-W-24469384.
@edmorley
edmorley merged commit b6b243a into main Nov 9, 2026
14 checks passed
@edmorley
edmorley deleted the edmorley/editable-fixture-coverage branch November 9, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changelog Skip the check-changelog check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants