diff --git a/spec/fixtures/pip_editable/packages/local_package_pyproject_toml/local_package_pyproject_toml/__init__.py b/spec/fixtures/pip_editable/packages/local_package_pyproject_toml/local_package_pyproject_toml/__init__.py index b86d791d2..6ce02c341 100644 --- a/spec/fixtures/pip_editable/packages/local_package_pyproject_toml/local_package_pyproject_toml/__init__.py +++ b/spec/fixtures/pip_editable/packages/local_package_pyproject_toml/local_package_pyproject_toml/__init__.py @@ -1,2 +1,2 @@ def hello(): - print("Hello pyproject.toml!") + print("Hello from pyproject.toml!") diff --git a/spec/fixtures/pip_editable/packages/local_package_setup_py/local_package_setup_py/__init__.py b/spec/fixtures/pip_editable/packages/local_package_setup_py/local_package_setup_py/__init__.py index e98d42373..8dccb8a0c 100644 --- a/spec/fixtures/pip_editable/packages/local_package_setup_py/local_package_setup_py/__init__.py +++ b/spec/fixtures/pip_editable/packages/local_package_setup_py/local_package_setup_py/__init__.py @@ -1,2 +1,2 @@ def hello(): - print("Hello setup.py!") + print("Hello from setup.py!") diff --git a/spec/fixtures/pipenv_editable/bin/test-entrypoints.sh b/spec/fixtures/pipenv_editable/bin/test-entrypoints.sh index 0e66f44bb..8057cbdcf 100755 --- a/spec/fixtures/pipenv_editable/bin/test-entrypoints.sh +++ b/spec/fixtures/pipenv_editable/bin/test-entrypoints.sh @@ -8,6 +8,9 @@ cd .heroku/python/lib/python*/site-packages/ grep --extended-regexp --only-matching -- '/\S+' *.pth __editable___*_finder.py | sort echo +echo -n "Running entrypoint for the current package: " +pipenv-editable + echo -n "Running entrypoint for the pyproject.toml-based local package: " local_package_pyproject_toml diff --git a/spec/fixtures/pipenv_editable/packages/local_package_pyproject_toml/local_package_pyproject_toml/__init__.py b/spec/fixtures/pipenv_editable/packages/local_package_pyproject_toml/local_package_pyproject_toml/__init__.py index b86d791d2..6ce02c341 100644 --- a/spec/fixtures/pipenv_editable/packages/local_package_pyproject_toml/local_package_pyproject_toml/__init__.py +++ b/spec/fixtures/pipenv_editable/packages/local_package_pyproject_toml/local_package_pyproject_toml/__init__.py @@ -1,2 +1,2 @@ def hello(): - print("Hello pyproject.toml!") + print("Hello from pyproject.toml!") diff --git a/spec/fixtures/pipenv_editable/packages/local_package_setup_py/local_package_setup_py/__init__.py b/spec/fixtures/pipenv_editable/packages/local_package_setup_py/local_package_setup_py/__init__.py index e98d42373..8dccb8a0c 100644 --- a/spec/fixtures/pipenv_editable/packages/local_package_setup_py/local_package_setup_py/__init__.py +++ b/spec/fixtures/pipenv_editable/packages/local_package_setup_py/local_package_setup_py/__init__.py @@ -1,2 +1,2 @@ def hello(): - print("Hello setup.py!") + print("Hello from setup.py!") diff --git a/spec/fixtures/pipenv_editable/pipenv_editable/__init__.py b/spec/fixtures/pipenv_editable/pipenv_editable/__init__.py index e69de29bb..0f03b9343 100644 --- a/spec/fixtures/pipenv_editable/pipenv_editable/__init__.py +++ b/spec/fixtures/pipenv_editable/pipenv_editable/__init__.py @@ -0,0 +1,2 @@ +def main() -> None: + print("Hello from pipenv-editable!") diff --git a/spec/fixtures/pipenv_editable/pyproject.toml b/spec/fixtures/pipenv_editable/pyproject.toml index 2ca4481db..f6dd79f06 100644 --- a/spec/fixtures/pipenv_editable/pyproject.toml +++ b/spec/fixtures/pipenv_editable/pyproject.toml @@ -3,6 +3,9 @@ name = "pipenv-editable" version = "0.0.0" requires-python = ">=3.13" +[project.scripts] +pipenv-editable = "pipenv_editable:main" + [build-system] requires = ["hatchling"] build-backend = "hatchling.build" diff --git a/spec/fixtures/pipenv_mismatched_python_version/.python-version b/spec/fixtures/pipenv_mismatched_python_version/.python-version new file mode 100644 index 000000000..d0c1d45b8 --- /dev/null +++ b/spec/fixtures/pipenv_mismatched_python_version/.python-version @@ -0,0 +1,2 @@ +# The version here intentionally doesn't match `python_version` in Pipfile.lock +3.13 diff --git a/spec/fixtures/pipenv_mismatched_python_version/Pipfile b/spec/fixtures/pipenv_mismatched_python_version/Pipfile new file mode 100644 index 000000000..f438ee65c --- /dev/null +++ b/spec/fixtures/pipenv_mismatched_python_version/Pipfile @@ -0,0 +1,10 @@ +[[source]] +url = "https://pypi.org/simple" +verify_ssl = true +name = "pypi" + +[packages] +typing-extensions = "*" + +[requires] +python_version = "3.12" diff --git a/spec/fixtures/pipenv_mismatched_python_version/Pipfile.lock b/spec/fixtures/pipenv_mismatched_python_version/Pipfile.lock new file mode 100644 index 000000000..6fdc90f5c --- /dev/null +++ b/spec/fixtures/pipenv_mismatched_python_version/Pipfile.lock @@ -0,0 +1,30 @@ +{ + "_meta": { + "hash": { + "sha256": "9661ed313a79ccb68c7dc4e639068f86ddd91e307ec2ed60498858d002e9b547" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "3.12" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "typing-extensions": { + "hashes": [ + "sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c", + "sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + ], + "index": "pypi", + "markers": "python_version >= '3.8'", + "version": "==4.13.2" + } + }, + "develop": {} +} diff --git a/spec/fixtures/poetry_editable/bin/test-entrypoints.sh b/spec/fixtures/poetry_editable/bin/test-entrypoints.sh index 0e66f44bb..dbdf50fee 100755 --- a/spec/fixtures/poetry_editable/bin/test-entrypoints.sh +++ b/spec/fixtures/poetry_editable/bin/test-entrypoints.sh @@ -8,6 +8,9 @@ cd .heroku/python/lib/python*/site-packages/ grep --extended-regexp --only-matching -- '/\S+' *.pth __editable___*_finder.py | sort echo +echo -n "Running entrypoint for the current package: " +poetry-editable + echo -n "Running entrypoint for the pyproject.toml-based local package: " local_package_pyproject_toml diff --git a/spec/fixtures/poetry_editable/packages/local_package_pyproject_toml/local_package_pyproject_toml/__init__.py b/spec/fixtures/poetry_editable/packages/local_package_pyproject_toml/local_package_pyproject_toml/__init__.py index b86d791d2..6ce02c341 100644 --- a/spec/fixtures/poetry_editable/packages/local_package_pyproject_toml/local_package_pyproject_toml/__init__.py +++ b/spec/fixtures/poetry_editable/packages/local_package_pyproject_toml/local_package_pyproject_toml/__init__.py @@ -1,2 +1,2 @@ def hello(): - print("Hello pyproject.toml!") + print("Hello from pyproject.toml!") diff --git a/spec/fixtures/poetry_editable/packages/local_package_setup_py/local_package_setup_py/__init__.py b/spec/fixtures/poetry_editable/packages/local_package_setup_py/local_package_setup_py/__init__.py index e98d42373..8dccb8a0c 100644 --- a/spec/fixtures/poetry_editable/packages/local_package_setup_py/local_package_setup_py/__init__.py +++ b/spec/fixtures/poetry_editable/packages/local_package_setup_py/local_package_setup_py/__init__.py @@ -1,2 +1,2 @@ def hello(): - print("Hello setup.py!") + print("Hello from setup.py!") diff --git a/spec/fixtures/poetry_editable/poetry_editable/__init__.py b/spec/fixtures/poetry_editable/poetry_editable/__init__.py index e69de29bb..e00661f98 100644 --- a/spec/fixtures/poetry_editable/poetry_editable/__init__.py +++ b/spec/fixtures/poetry_editable/poetry_editable/__init__.py @@ -0,0 +1,2 @@ +def main() -> None: + print("Hello from poetry-editable!") diff --git a/spec/fixtures/poetry_editable/pyproject.toml b/spec/fixtures/poetry_editable/pyproject.toml index 256e2d984..8df4cea76 100644 --- a/spec/fixtures/poetry_editable/pyproject.toml +++ b/spec/fixtures/poetry_editable/pyproject.toml @@ -10,6 +10,9 @@ gunicorn = { git = "https://github.com/benoitc/gunicorn.git", develop = true } local-package-pyproject-toml = { path = "packages/local_package_pyproject_toml", develop = true } local-package-setup-py = { path = "packages/local_package_setup_py", develop = true } +[tool.poetry.scripts] +poetry-editable = 'poetry_editable:main' + [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" diff --git a/spec/fixtures/poetry_mismatched_python_version/.python-version b/spec/fixtures/poetry_mismatched_python_version/.python-version new file mode 100644 index 000000000..88c9ebc82 --- /dev/null +++ b/spec/fixtures/poetry_mismatched_python_version/.python-version @@ -0,0 +1,2 @@ +# The version here intentionally doesn't match requires-python in pyproject.toml +3.13 diff --git a/spec/fixtures/poetry_mismatched_python_version/poetry.lock b/spec/fixtures/poetry_mismatched_python_version/poetry.lock new file mode 100644 index 000000000..5da81ae0f --- /dev/null +++ b/spec/fixtures/poetry_mismatched_python_version/poetry.lock @@ -0,0 +1,18 @@ +# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand. + +[[package]] +name = "typing-extensions" +version = "4.13.2" +description = "Backported and Experimental Type Hints for Python 3.8+" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "typing_extensions-4.13.2-py3-none-any.whl", hash = "sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c"}, + {file = "typing_extensions-4.13.2.tar.gz", hash = "sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef"}, +] + +[metadata] +lock-version = "2.1" +python-versions = "3.12.*" +content-hash = "30427e182c131408fcdf15a6838a771f7e7c1e67fa6e0c33ccc82194052de8df" diff --git a/spec/fixtures/poetry_mismatched_python_version/pyproject.toml b/spec/fixtures/poetry_mismatched_python_version/pyproject.toml new file mode 100644 index 000000000..ed26e3dc4 --- /dev/null +++ b/spec/fixtures/poetry_mismatched_python_version/pyproject.toml @@ -0,0 +1,13 @@ +[project] +name = "poetry-mismatched-python-version" +version = "0.0.0" +# This Python version intentionally doesn't match that in .python-version. +# The version here also matches the distro Python version in Ubuntu 24.04, +# so we can also test Poetry doesn't fall back to system Python. +requires-python = "3.12.*" +dependencies = [ + "typing-extensions" +] + +[tool.poetry] +package-mode = false diff --git a/spec/hatchet/pip_spec.rb b/spec/hatchet/pip_spec.rb index 5cc9f8b8e..0db1f7693 100644 --- a/spec/hatchet/pip_spec.rb +++ b/spec/hatchet/pip_spec.rb @@ -108,8 +108,8 @@ remote: gunicorn.egg-link:/app/.heroku/python/src/gunicorn remote: local-package-setup-py.egg-link:/tmp/build_.+/packages/local_package_setup_py remote: - remote: Running entrypoint for the pyproject.toml-based local package: Hello pyproject.toml! - remote: Running entrypoint for the setup.py-based local package: Hello setup.py! + remote: Running entrypoint for the pyproject.toml-based local package: Hello from pyproject.toml! + remote: Running entrypoint for the setup.py-based local package: Hello from setup.py! remote: Running entrypoint for the VCS package: gunicorn \\(version 20.1.0\\) remote: -----> Inline app detected remote: easy-install.pth:/app/.heroku/python/src/gunicorn @@ -118,8 +118,8 @@ remote: gunicorn.egg-link:/app/.heroku/python/src/gunicorn remote: local-package-setup-py.egg-link:/tmp/build_.+/packages/local_package_setup_py remote: - remote: Running entrypoint for the pyproject.toml-based local package: Hello pyproject.toml! - remote: Running entrypoint for the setup.py-based local package: Hello setup.py! + remote: Running entrypoint for the pyproject.toml-based local package: Hello from pyproject.toml! + remote: Running entrypoint for the setup.py-based local package: Hello from setup.py! remote: Running entrypoint for the VCS package: gunicorn \\(version 20.1.0\\) REGEX @@ -131,8 +131,8 @@ gunicorn.egg-link:/app/.heroku/python/src/gunicorn local-package-setup-py.egg-link:/app/packages/local_package_setup_py - Running entrypoint for the pyproject.toml-based local package: Hello pyproject.toml! - Running entrypoint for the setup.py-based local package: Hello setup.py! + Running entrypoint for the pyproject.toml-based local package: Hello from pyproject.toml! + Running entrypoint for the setup.py-based local package: Hello from setup.py! Running entrypoint for the VCS package: gunicorn (version 20.1.0) OUTPUT @@ -147,8 +147,8 @@ remote: gunicorn.egg-link:/app/.heroku/python/src/gunicorn remote: local-package-setup-py.egg-link:/tmp/build_.+/packages/local_package_setup_py remote: - remote: Running entrypoint for the pyproject.toml-based local package: Hello pyproject.toml! - remote: Running entrypoint for the setup.py-based local package: Hello setup.py! + remote: Running entrypoint for the pyproject.toml-based local package: Hello from pyproject.toml! + remote: Running entrypoint for the setup.py-based local package: Hello from setup.py! remote: Running entrypoint for the VCS package: gunicorn \\(version 20.1.0\\) remote: -----> Inline app detected remote: easy-install.pth:/app/.heroku/python/src/gunicorn @@ -157,8 +157,8 @@ remote: gunicorn.egg-link:/app/.heroku/python/src/gunicorn remote: local-package-setup-py.egg-link:/tmp/build_.+/packages/local_package_setup_py remote: - remote: Running entrypoint for the pyproject.toml-based local package: Hello pyproject.toml! - remote: Running entrypoint for the setup.py-based local package: Hello setup.py! + remote: Running entrypoint for the pyproject.toml-based local package: Hello from pyproject.toml! + remote: Running entrypoint for the setup.py-based local package: Hello from setup.py! remote: Running entrypoint for the VCS package: gunicorn \\(version 20.1.0\\) REGEX # Test that the VCS repo checkout was cached correctly. diff --git a/spec/hatchet/pipenv_spec.rb b/spec/hatchet/pipenv_spec.rb index 2c1457fd6..78346f03c 100644 --- a/spec/hatchet/pipenv_spec.rb +++ b/spec/hatchet/pipenv_spec.rb @@ -407,8 +407,9 @@ remote: __editable___local_package_setup_py_0_0_1_finder.py:/tmp/build_.+/packages/local_package_setup_py/local_package_setup_py'} remote: _pipenv_editable.pth:/tmp/build_.+ remote: - remote: Running entrypoint for the pyproject.toml-based local package: Hello pyproject.toml! - remote: Running entrypoint for the setup.py-based local package: Hello setup.py! + remote: Running entrypoint for the current package: Hello from pipenv-editable! + remote: Running entrypoint for the pyproject.toml-based local package: Hello from pyproject.toml! + remote: Running entrypoint for the setup.py-based local package: Hello from setup.py! remote: Running entrypoint for the VCS package: gunicorn \\(version 23.0.0\\) remote: -----> Inline app detected remote: __editable___gunicorn_23_0_0_finder.py:/app/.heroku/python/src/gunicorn/gunicorn'} @@ -416,8 +417,9 @@ remote: __editable___local_package_setup_py_0_0_1_finder.py:/tmp/build_.+/packages/local_package_setup_py/local_package_setup_py'} remote: _pipenv_editable.pth:/tmp/build_.+ remote: - remote: Running entrypoint for the pyproject.toml-based local package: Hello pyproject.toml! - remote: Running entrypoint for the setup.py-based local package: Hello setup.py! + remote: Running entrypoint for the current package: Hello from pipenv-editable! + remote: Running entrypoint for the pyproject.toml-based local package: Hello from pyproject.toml! + remote: Running entrypoint for the setup.py-based local package: Hello from setup.py! remote: Running entrypoint for the VCS package: gunicorn \\(version 23.0.0\\) REGEX @@ -428,8 +430,9 @@ __editable___local_package_setup_py_0_0_1_finder.py:/app/packages/local_package_setup_py/local_package_setup_py'} _pipenv_editable.pth:/app - Running entrypoint for the pyproject.toml-based local package: Hello pyproject.toml! - Running entrypoint for the setup.py-based local package: Hello setup.py! + Running entrypoint for the current package: Hello from pipenv-editable! + Running entrypoint for the pyproject.toml-based local package: Hello from pyproject.toml! + Running entrypoint for the setup.py-based local package: Hello from setup.py! Running entrypoint for the VCS package: gunicorn (version 23.0.0) OUTPUT @@ -445,8 +448,9 @@ remote: __editable___local_package_setup_py_0_0_1_finder.py:/tmp/build_.+/packages/local_package_setup_py/local_package_setup_py'} remote: _pipenv_editable.pth:/tmp/build_.+ remote: - remote: Running entrypoint for the pyproject.toml-based local package: Hello pyproject.toml! - remote: Running entrypoint for the setup.py-based local package: Hello setup.py! + remote: Running entrypoint for the current package: Hello from pipenv-editable! + remote: Running entrypoint for the pyproject.toml-based local package: Hello from pyproject.toml! + remote: Running entrypoint for the setup.py-based local package: Hello from setup.py! remote: Running entrypoint for the VCS package: gunicorn \\(version 23.0.0\\) remote: -----> Inline app detected remote: __editable___gunicorn_23_0_0_finder.py:/app/.heroku/python/src/gunicorn/gunicorn'} @@ -454,14 +458,31 @@ remote: __editable___local_package_setup_py_0_0_1_finder.py:/tmp/build_.+/packages/local_package_setup_py/local_package_setup_py'} remote: _pipenv_editable.pth:/tmp/build_.+ remote: - remote: Running entrypoint for the pyproject.toml-based local package: Hello pyproject.toml! - remote: Running entrypoint for the setup.py-based local package: Hello setup.py! + remote: Running entrypoint for the current package: Hello from pipenv-editable! + remote: Running entrypoint for the pyproject.toml-based local package: Hello from pyproject.toml! + remote: Running entrypoint for the setup.py-based local package: Hello from setup.py! remote: Running entrypoint for the VCS package: gunicorn \\(version 23.0.0\\) REGEX end end end + # This tests that Pipenv doesn't fall back to system Python if the Python version in + # pyproject.toml doesn't match that in Pipfile / Pipfile.lock. + context 'when requires-python in pyproject.toml is incompatible with .python-version', + skip: 'this is currently broken upstream: https://github.com/pypa/pipenv/issues/6403' do + let(:app) { Hatchet::Runner.new('spec/fixtures/pipenv_mismatched_python_version', allow_failure: true) } + + it 'fails the build' do + app.deploy do |app| + expect(clean_output(app.output)).to include(<<~OUTPUT) + remote: -----> Installing dependencies using 'pipenv install --deploy' + remote: + OUTPUT + end + end + end + # This tests not only our handling of failing dependency installation, but also that we're running # Pipenv in such a way that it errors if the lockfile is out of sync, rather than simply updating it. context 'when the Pipfile.lock is out of sync with Pipfile' do diff --git a/spec/hatchet/poetry_spec.rb b/spec/hatchet/poetry_spec.rb index 242718664..b2b5a782f 100644 --- a/spec/hatchet/poetry_spec.rb +++ b/spec/hatchet/poetry_spec.rb @@ -115,8 +115,9 @@ remote: __editable___local_package_setup_py_0_0_1_finder.py:/tmp/build_.+/packages/local_package_setup_py/local_package_setup_py'} remote: poetry_editable.pth:/tmp/build_.+ remote: - remote: Running entrypoint for the pyproject.toml-based local package: Hello pyproject.toml! - remote: Running entrypoint for the setup.py-based local package: Hello setup.py! + remote: Running entrypoint for the current package: Hello from poetry-editable! + remote: Running entrypoint for the pyproject.toml-based local package: Hello from pyproject.toml! + remote: Running entrypoint for the setup.py-based local package: Hello from setup.py! remote: Running entrypoint for the VCS package: gunicorn \\(version 23.0.0\\) remote: -----> Inline app detected remote: __editable___gunicorn_23_0_0_finder.py:/app/.heroku/python/src/gunicorn/gunicorn'} @@ -124,8 +125,9 @@ remote: __editable___local_package_setup_py_0_0_1_finder.py:/tmp/build_.+/packages/local_package_setup_py/local_package_setup_py'} remote: poetry_editable.pth:/tmp/build_.+ remote: - remote: Running entrypoint for the pyproject.toml-based local package: Hello pyproject.toml! - remote: Running entrypoint for the setup.py-based local package: Hello setup.py! + remote: Running entrypoint for the current package: Hello from poetry-editable! + remote: Running entrypoint for the pyproject.toml-based local package: Hello from pyproject.toml! + remote: Running entrypoint for the setup.py-based local package: Hello from setup.py! remote: Running entrypoint for the VCS package: gunicorn \\(version 23.0.0\\) REGEX @@ -136,8 +138,9 @@ __editable___local_package_setup_py_0_0_1_finder.py:/app/packages/local_package_setup_py/local_package_setup_py'} poetry_editable.pth:/app - Running entrypoint for the pyproject.toml-based local package: Hello pyproject.toml! - Running entrypoint for the setup.py-based local package: Hello setup.py! + Running entrypoint for the current package: Hello from poetry-editable! + Running entrypoint for the pyproject.toml-based local package: Hello from pyproject.toml! + Running entrypoint for the setup.py-based local package: Hello from setup.py! Running entrypoint for the VCS package: gunicorn (version 23.0.0) OUTPUT @@ -161,8 +164,9 @@ remote: __editable___local_package_setup_py_0_0_1_finder.py:/tmp/build_.+/packages/local_package_setup_py/local_package_setup_py'} remote: poetry_editable.pth:/tmp/build_.+ remote: - remote: Running entrypoint for the pyproject.toml-based local package: Hello pyproject.toml! - remote: Running entrypoint for the setup.py-based local package: Hello setup.py! + remote: Running entrypoint for the current package: Hello from poetry-editable! + remote: Running entrypoint for the pyproject.toml-based local package: Hello from pyproject.toml! + remote: Running entrypoint for the setup.py-based local package: Hello from setup.py! remote: Running entrypoint for the VCS package: gunicorn \\(version 23.0.0\\) remote: -----> Inline app detected remote: __editable___gunicorn_23_0_0_finder.py:/app/.heroku/python/src/gunicorn/gunicorn'} @@ -170,8 +174,9 @@ remote: __editable___local_package_setup_py_0_0_1_finder.py:/tmp/build_.+/packages/local_package_setup_py/local_package_setup_py'} remote: poetry_editable.pth:/tmp/build_.+ remote: - remote: Running entrypoint for the pyproject.toml-based local package: Hello pyproject.toml! - remote: Running entrypoint for the setup.py-based local package: Hello setup.py! + remote: Running entrypoint for the current package: Hello from poetry-editable! + remote: Running entrypoint for the pyproject.toml-based local package: Hello from pyproject.toml! + remote: Running entrypoint for the setup.py-based local package: Hello from setup.py! remote: Running entrypoint for the VCS package: gunicorn \\(version 23.0.0\\) REGEX end @@ -236,6 +241,22 @@ end end + # This tests that Poetry doesn't download its own Python or fall back to system Python + # if the Python version in pyproject.toml doesn't match that in .python-version. + context 'when requires-python in pyproject.toml is incompatible with .python-version', + skip: 'this is currently broken upstream: https://github.com/python-poetry/poetry/issues/10226' do + let(:app) { Hatchet::Runner.new('spec/fixtures/poetry_mismatched_python_version', allow_failure: true) } + + it 'fails the build' do + app.deploy do |app| + expect(clean_output(app.output)).to include(<<~OUTPUT) + remote: -----> Installing dependencies using 'poetry sync --only main' + remote: + OUTPUT + end + end + end + # This tests not only our handling of failing dependency installation, but also that we're running # Poetry in such a way that it errors if the lockfile is out of sync, rather than simply updating it. context 'when poetry.lock is out of sync with pyproject.toml' do