PoC: automatically create a pinned
extra with dependencies pinned from the lock file
#9428
Task Summary
Instruction pytest failed in 01:32
Details
✅ 00:03 clone
✅ 00:59 bootstrap_poetry
✅ 00:16 setup_environment
❌ 01:32 pytest
shutil.rmtree(tmp_project_path / "dist")
(tmp_project_path / "src").mkdir()
(tmp_project_path / "simple_project").rename(
tmp_project_path / "src" / "simple_project"
)
# We have to use ApplicationTester because CommandTester
# initializes Poetry before passing the directory.
app = Application()
tester = ApplicationTester(app)
tester.execute("build --directory .")
build_dir = tmp_project_path / "dist"
> assert len(list(build_dir.iterdir())) == 2
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:213:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_relative_directory_0/project/dist')
def iterdir(self):
"""Iterate over the files in this directory. Does not yield any
result for the special paths '.' and '..'.
"""
> for name in self._accessor.listdir(self):
E FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_relative_directory_0/project/dist'
/usr/local/lib/python3.9/pathlib.py:1160: FileNotFoundError
-------------- generated xml file: /tmp/cirrus-ci-build/junit.xml --------------
=========================== short test summary info ============================
SKIPPED [1] tests/integration/test_utils_vcs_git.py:315: HTTP authentication credentials not available
SKIPPED [2] tests/installation/test_installer.py:1869: This is not working at the moment due to limitations in the resolver
SKIPPED [1] tests/utils/env/test_env_manager.py:1291: requires darwin
SKIPPED [1] tests/utils/env/test_env.py:525: Windows only
SKIPPED [1] tests/installation/test_executor.py:305: https://github.com/python-poetry/poetry/issues/7983
SKIPPED [1] tests/puzzle/test_solver.py:3809: Poetry no longer has critical package requirements
SKIPPED [1] tests/console/commands/test_run.py:88: Poetry only installs CMD script files for console scripts of editable dependencies on Windows
FAILED tests/console/commands/test_publish.py::test_publish_dist_dir_and_build_options[absolute] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_publish.py::test_publish_dist_dir_and_build_options[tmp/dist] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_publish.py::test_publish_dist_dir_and_build_options[../dist] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_creates_packages_in_dist_directory_if_no_output_is_specified[wheel] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_with_multiple_readme_files - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_output_option[../dist] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_creates_packages_in_dist_directory_if_no_output_is_specified[all] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_with_clean[False] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_creates_packages_in_dist_directory_if_no_output_is_specified[sdist] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_output_option[dist] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_with_local_version_label - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_output_option[None] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_with_clean[True] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_output_option[absolute] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_with_clean_non_existing_output - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_output_option[test/dir] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_relative_directory_src_layout - FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_relative_directory_0/project/dist'
============ 17 failed, 1950 passed, 8 skipped in 90.52s (0:01:30) =============
Annotations
Check failure on line 218 in tests/console/commands/test_publish.py
cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest
tests/console/commands/test_publish.py#L218
tests.console.commands.test_publish.test_publish_dist_dir_and_build_options[absolute]
Raw output
http = <module 'httpretty' from '/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/httpretty/__init__.py'>
fixture_dir = <function fixture_dir.<locals>._fixture_dir at 0x14399539de50>
tmp_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_publish_dist_dir_and_buil0')
tmp_venv = VirtualEnv("/tmp/pytest-of-root/pytest-0/popen-gw1/test_publish_dist_dir_and_buil0/venv")
command_tester_factory = <function command_tester_factory.<locals>._tester at 0x14399b487310>
dist_dir = 'absolute'
@pytest.mark.parametrize("dist_dir", ["../dist", "tmp/dist", "absolute"])
def test_publish_dist_dir_and_build_options(
http: type[httpretty.httpretty],
fixture_dir: FixtureDirGetter,
tmp_path: Path,
tmp_venv: VirtualEnv,
command_tester_factory: CommandTesterFactory,
dist_dir: str | None,
) -> None:
source_dir = fixture_dir("simple_project")
target_dir = tmp_path / "project"
shutil.copytree(str(source_dir), str(target_dir))
# Remove dist dir because as it will be built again
shutil.rmtree(target_dir / "dist")
http.register_uri(
http.POST, "https://upload.pypi.org/legacy/", status=409, body="Conflict"
)
poetry = Factory().create_poetry(target_dir)
tester = command_tester_factory("publish", poetry, environment=tmp_venv)
if dist_dir == "absolute":
> exit_code = tester.execute(
f"--dist-dir {target_dir / 'test/dist'} --dry-run --build"
)
/tmp/cirrus-ci-build/tests/console/commands/test_publish.py:218:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/publish.py:83: in handle
self.call("build", args=f"--output {dist_dir}")
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/command.py:78: in call
return self.application._run_command(
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/application.py:473: in _run_command
raise error
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/application.py:457: in _run_command
exit_code = command.run(io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x14399aae0130>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 222 in tests/console/commands/test_publish.py
cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest
tests/console/commands/test_publish.py#L222
tests.console.commands.test_publish.test_publish_dist_dir_and_build_options[tmp/dist]
Raw output
http = <module 'httpretty' from '/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/httpretty/__init__.py'>
fixture_dir = <function fixture_dir.<locals>._fixture_dir at 0x14399539de50>
tmp_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_publish_dist_dir_and_buil1')
tmp_venv = VirtualEnv("/tmp/pytest-of-root/pytest-0/popen-gw1/test_publish_dist_dir_and_buil1/venv")
command_tester_factory = <function command_tester_factory.<locals>._tester at 0x14399bf5d040>
dist_dir = 'tmp/dist'
@pytest.mark.parametrize("dist_dir", ["../dist", "tmp/dist", "absolute"])
def test_publish_dist_dir_and_build_options(
http: type[httpretty.httpretty],
fixture_dir: FixtureDirGetter,
tmp_path: Path,
tmp_venv: VirtualEnv,
command_tester_factory: CommandTesterFactory,
dist_dir: str | None,
) -> None:
source_dir = fixture_dir("simple_project")
target_dir = tmp_path / "project"
shutil.copytree(str(source_dir), str(target_dir))
# Remove dist dir because as it will be built again
shutil.rmtree(target_dir / "dist")
http.register_uri(
http.POST, "https://upload.pypi.org/legacy/", status=409, body="Conflict"
)
poetry = Factory().create_poetry(target_dir)
tester = command_tester_factory("publish", poetry, environment=tmp_venv)
if dist_dir == "absolute":
exit_code = tester.execute(
f"--dist-dir {target_dir / 'test/dist'} --dry-run --build"
)
else:
> exit_code = tester.execute(f"--dist-dir {dist_dir} --dry-run --build")
/tmp/cirrus-ci-build/tests/console/commands/test_publish.py:222:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/publish.py:83: in handle
self.call("build", args=f"--output {dist_dir}")
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/command.py:78: in call
return self.application._run_command(
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/application.py:473: in _run_command
raise error
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/application.py:457: in _run_command
exit_code = command.run(io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x14399bc6bf10>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 222 in tests/console/commands/test_publish.py
cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest
tests/console/commands/test_publish.py#L222
tests.console.commands.test_publish.test_publish_dist_dir_and_build_options[../dist]
Raw output
http = <module 'httpretty' from '/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/httpretty/__init__.py'>
fixture_dir = <function fixture_dir.<locals>._fixture_dir at 0x14399539de50>
tmp_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_publish_dist_dir_and_buil2')
tmp_venv = VirtualEnv("/tmp/pytest-of-root/pytest-0/popen-gw1/test_publish_dist_dir_and_buil2/venv")
command_tester_factory = <function command_tester_factory.<locals>._tester at 0x14399bfcf1f0>
dist_dir = '../dist'
@pytest.mark.parametrize("dist_dir", ["../dist", "tmp/dist", "absolute"])
def test_publish_dist_dir_and_build_options(
http: type[httpretty.httpretty],
fixture_dir: FixtureDirGetter,
tmp_path: Path,
tmp_venv: VirtualEnv,
command_tester_factory: CommandTesterFactory,
dist_dir: str | None,
) -> None:
source_dir = fixture_dir("simple_project")
target_dir = tmp_path / "project"
shutil.copytree(str(source_dir), str(target_dir))
# Remove dist dir because as it will be built again
shutil.rmtree(target_dir / "dist")
http.register_uri(
http.POST, "https://upload.pypi.org/legacy/", status=409, body="Conflict"
)
poetry = Factory().create_poetry(target_dir)
tester = command_tester_factory("publish", poetry, environment=tmp_venv)
if dist_dir == "absolute":
exit_code = tester.execute(
f"--dist-dir {target_dir / 'test/dist'} --dry-run --build"
)
else:
> exit_code = tester.execute(f"--dist-dir {dist_dir} --dry-run --build")
/tmp/cirrus-ci-build/tests/console/commands/test_publish.py:222:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/publish.py:83: in handle
self.call("build", args=f"--output {dist_dir}")
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/command.py:78: in call
return self.application._run_command(
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/application.py:473: in _run_command
raise error
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/application.py:457: in _run_command
exit_code = command.run(io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x143999954100>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 68 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest
tests/console/commands/test_build.py#L68
tests.console.commands.test_build.test_build_creates_packages_in_dist_directory_if_no_output_is_specified[wheel]
Raw output
tmp_tester = <cleo.testers.command_tester.CommandTester object at 0x14399854f220>
tmp_project_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_creates_packages_in0/project')
tmp_poetry = <poetry.poetry.Poetry object at 0x1439996ff820>, format = 'wheel'
@pytest.mark.parametrize("format", ["sdist", "wheel", "all"])
def test_build_creates_packages_in_dist_directory_if_no_output_is_specified(
tmp_tester: CommandTester, tmp_project_path: Path, tmp_poetry: Poetry, format: str
) -> None:
shutil.rmtree(tmp_project_path / "dist")
> tmp_tester.execute(f"--format {format}")
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x14399854f790>
fmt = 'wheel'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 149 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest
tests/console/commands/test_build.py#L149
tests.console.commands.test_build.test_build_with_multiple_readme_files
Raw output
fixture_dir = <function fixture_dir.<locals>._fixture_dir at 0x14399539de50>
tmp_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_with_multiple_readm0')
tmp_venv = VirtualEnv("/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_with_multiple_readm0/venv")
command_tester_factory = <function command_tester_factory.<locals>._tester at 0x14399c05bdc0>
def test_build_with_multiple_readme_files(
fixture_dir: FixtureDirGetter,
tmp_path: Path,
tmp_venv: VirtualEnv,
command_tester_factory: CommandTesterFactory,
) -> None:
source_dir = fixture_dir("with_multiple_readme_files")
target_dir = tmp_path / "project"
shutil.copytree(str(source_dir), str(target_dir))
poetry = Factory().create_poetry(target_dir)
tester = command_tester_factory("build", poetry, environment=tmp_venv)
> tester.execute()
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:149:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x1439969d46d0>
fmt = 'all'
executable = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_with_multiple_readm0/venv/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 186 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest
tests/console/commands/test_build.py#L186
tests.console.commands.test_build.test_build_output_option[../dist]
Raw output
tmp_tester = <cleo.testers.command_tester.CommandTester object at 0x143999537040>
tmp_project_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_output_option____di0/project')
tmp_poetry = <poetry.poetry.Poetry object at 0x14399bab9220>
output_dir = '../dist'
@pytest.mark.parametrize(
"output_dir", [None, "dist", "test/dir", "../dist", "absolute"]
)
def test_build_output_option(
tmp_tester: CommandTester,
tmp_project_path: Path,
tmp_poetry: Poetry,
output_dir: str,
) -> None:
shutil.rmtree(tmp_project_path / "dist")
if output_dir is None:
tmp_tester.execute()
build_dir = tmp_project_path / "dist"
elif output_dir == "absolute":
tmp_tester.execute(f"--output {tmp_project_path / 'tmp/dist'}")
build_dir = tmp_project_path / "tmp/dist"
else:
> tmp_tester.execute(f"--output {output_dir}")
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:186:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x143999537790>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 68 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest
tests/console/commands/test_build.py#L68
tests.console.commands.test_build.test_build_creates_packages_in_dist_directory_if_no_output_is_specified[all]
Raw output
tmp_tester = <cleo.testers.command_tester.CommandTester object at 0x14399cd8d640>
tmp_project_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_creates_packages_in1/project')
tmp_poetry = <poetry.poetry.Poetry object at 0x14399cd8d880>, format = 'all'
@pytest.mark.parametrize("format", ["sdist", "wheel", "all"])
def test_build_creates_packages_in_dist_directory_if_no_output_is_specified(
tmp_tester: CommandTester, tmp_project_path: Path, tmp_poetry: Poetry, format: str
) -> None:
shutil.rmtree(tmp_project_path / "dist")
> tmp_tester.execute(f"--format {format}")
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x14399cd8d400>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 99 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest
tests/console/commands/test_build.py#L99
tests.console.commands.test_build.test_build_with_clean[False]
Raw output
tmp_tester = <cleo.testers.command_tester.CommandTester object at 0x143997a18e50>
tmp_project_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_with_clean_False_0/project')
tmp_poetry = <poetry.poetry.Poetry object at 0x1439979fa790>, clean = False
@pytest.mark.parametrize("clean", [True, False])
def test_build_with_clean(
tmp_tester: CommandTester, tmp_project_path: Path, tmp_poetry: Poetry, clean: bool
) -> None:
dist_dir = tmp_project_path.joinpath("dist")
dist_dir.joinpath("hello").touch(exist_ok=True)
> tmp_tester.execute("--clean" if clean else "")
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:99:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x143997a18220>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 68 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest
tests/console/commands/test_build.py#L68
tests.console.commands.test_build.test_build_creates_packages_in_dist_directory_if_no_output_is_specified[sdist]
Raw output
tmp_tester = <cleo.testers.command_tester.CommandTester object at 0x143999aca4f0>
tmp_project_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_creates_packages_in2/project')
tmp_poetry = <poetry.poetry.Poetry object at 0x14399989e4f0>, format = 'sdist'
@pytest.mark.parametrize("format", ["sdist", "wheel", "all"])
def test_build_creates_packages_in_dist_directory_if_no_output_is_specified(
tmp_tester: CommandTester, tmp_project_path: Path, tmp_poetry: Poetry, format: str
) -> None:
shutil.rmtree(tmp_project_path / "dist")
> tmp_tester.execute(f"--format {format}")
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x143999aca640>
fmt = 'sdist'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 186 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest
tests/console/commands/test_build.py#L186
tests.console.commands.test_build.test_build_output_option[dist]
Raw output
tmp_tester = <cleo.testers.command_tester.CommandTester object at 0x14399b470550>
tmp_project_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_output_option_dist_0/project')
tmp_poetry = <poetry.poetry.Poetry object at 0x14399ca66be0>
output_dir = 'dist'
@pytest.mark.parametrize(
"output_dir", [None, "dist", "test/dir", "../dist", "absolute"]
)
def test_build_output_option(
tmp_tester: CommandTester,
tmp_project_path: Path,
tmp_poetry: Poetry,
output_dir: str,
) -> None:
shutil.rmtree(tmp_project_path / "dist")
if output_dir is None:
tmp_tester.execute()
build_dir = tmp_project_path / "dist"
elif output_dir == "absolute":
tmp_tester.execute(f"--output {tmp_project_path / 'tmp/dist'}")
build_dir = tmp_project_path / "tmp/dist"
else:
> tmp_tester.execute(f"--output {output_dir}")
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:186:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x14399b470340>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 81 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest
tests/console/commands/test_build.py#L81
tests.console.commands.test_build.test_build_with_local_version_label
Raw output
tmp_tester = <cleo.testers.command_tester.CommandTester object at 0x143998670fd0>
tmp_project_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_with_local_version_0/project')
tmp_poetry = <poetry.poetry.Poetry object at 0x143999624a60>
def test_build_with_local_version_label(
tmp_tester: CommandTester, tmp_project_path: Path, tmp_poetry: Poetry
) -> None:
shutil.rmtree(tmp_project_path / "dist")
local_version_label = "local-version"
> tmp_tester.execute(f"--local-version {local_version_label}")
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:81:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x143998670a00>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 180 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest
tests/console/commands/test_build.py#L180
tests.console.commands.test_build.test_build_output_option[None]
Raw output
tmp_tester = <cleo.testers.command_tester.CommandTester object at 0x1439999dc7c0>
tmp_project_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_output_option_None_0/project')
tmp_poetry = <poetry.poetry.Poetry object at 0x1439955b66a0>, output_dir = None
@pytest.mark.parametrize(
"output_dir", [None, "dist", "test/dir", "../dist", "absolute"]
)
def test_build_output_option(
tmp_tester: CommandTester,
tmp_project_path: Path,
tmp_poetry: Poetry,
output_dir: str,
) -> None:
shutil.rmtree(tmp_project_path / "dist")
if output_dir is None:
> tmp_tester.execute()
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x1439999dc8e0>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 99 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest
tests/console/commands/test_build.py#L99
tests.console.commands.test_build.test_build_with_clean[True]
Raw output
tmp_tester = <cleo.testers.command_tester.CommandTester object at 0x14399994d190>
tmp_project_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_with_clean_True_0/project')
tmp_poetry = <poetry.poetry.Poetry object at 0x14399c01ae80>, clean = True
@pytest.mark.parametrize("clean", [True, False])
def test_build_with_clean(
tmp_tester: CommandTester, tmp_project_path: Path, tmp_poetry: Poetry, clean: bool
) -> None:
dist_dir = tmp_project_path.joinpath("dist")
dist_dir.joinpath("hello").touch(exist_ok=True)
> tmp_tester.execute("--clean" if clean else "")
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:99:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x14399994d5e0>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 183 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest
tests/console/commands/test_build.py#L183
tests.console.commands.test_build.test_build_output_option[absolute]
Raw output
tmp_tester = <cleo.testers.command_tester.CommandTester object at 0x14399bb8cfa0>
tmp_project_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_output_option_absol0/project')
tmp_poetry = <poetry.poetry.Poetry object at 0x14399aa9d100>
output_dir = 'absolute'
@pytest.mark.parametrize(
"output_dir", [None, "dist", "test/dir", "../dist", "absolute"]
)
def test_build_output_option(
tmp_tester: CommandTester,
tmp_project_path: Path,
tmp_poetry: Poetry,
output_dir: str,
) -> None:
shutil.rmtree(tmp_project_path / "dist")
if output_dir is None:
tmp_tester.execute()
build_dir = tmp_project_path / "dist"
elif output_dir == "absolute":
> tmp_tester.execute(f"--output {tmp_project_path / 'tmp/dist'}")
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:183:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x14399bb8c1f0>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 114 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest
tests/console/commands/test_build.py#L114
tests.console.commands.test_build.test_build_with_clean_non_existing_output
Raw output
tmp_tester = <cleo.testers.command_tester.CommandTester object at 0x14399c7a3580>
tmp_project_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_with_clean_non_exis0/project')
tmp_poetry = <poetry.poetry.Poetry object at 0x143999960040>
def test_build_with_clean_non_existing_output(
tmp_tester: CommandTester, tmp_project_path: Path, tmp_poetry: Poetry
) -> None:
dist_dir = tmp_project_path.joinpath("dist")
remove_directory(dist_dir, force=True)
assert not dist_dir.exists()
> tmp_tester.execute("--clean")
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:114:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x14399c7a33d0>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 186 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest
tests/console/commands/test_build.py#L186
tests.console.commands.test_build.test_build_output_option[test/dir]
Raw output
tmp_tester = <cleo.testers.command_tester.CommandTester object at 0x14399babea00>
tmp_project_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_output_option_test_0/project')
tmp_poetry = <poetry.poetry.Poetry object at 0x1439996fa520>
output_dir = 'test/dir'
@pytest.mark.parametrize(
"output_dir", [None, "dist", "test/dir", "../dist", "absolute"]
)
def test_build_output_option(
tmp_tester: CommandTester,
tmp_project_path: Path,
tmp_poetry: Poetry,
output_dir: str,
) -> None:
shutil.rmtree(tmp_project_path / "dist")
if output_dir is None:
tmp_tester.execute()
build_dir = tmp_project_path / "dist"
elif output_dir == "absolute":
tmp_tester.execute(f"--output {tmp_project_path / 'tmp/dist'}")
build_dir = tmp_project_path / "tmp/dist"
else:
> tmp_tester.execute(f"--output {output_dir}")
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:186:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/lib/python3.9/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x14399babe640>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.9/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 213 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest
tests/console/commands/test_build.py#L213
tests.console.commands.test_build.test_build_relative_directory_src_layout
Raw output
tmp_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_relative_directory_0')
fixture_dir = <function fixture_dir.<locals>._fixture_dir at 0x14399539de50>
def test_build_relative_directory_src_layout(
tmp_path: Path, fixture_dir: FixtureDirGetter
) -> None:
tmp_project_path = tmp_path / "project"
with with_working_directory(fixture_dir("simple_project"), tmp_project_path):
shutil.rmtree(tmp_project_path / "dist")
(tmp_project_path / "src").mkdir()
(tmp_project_path / "simple_project").rename(
tmp_project_path / "src" / "simple_project"
)
# We have to use ApplicationTester because CommandTester
# initializes Poetry before passing the directory.
app = Application()
tester = ApplicationTester(app)
tester.execute("build --directory .")
build_dir = tmp_project_path / "dist"
> assert len(list(build_dir.iterdir())) == 2
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:213:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_relative_directory_0/project/dist')
def iterdir(self):
"""Iterate over the files in this directory. Does not yield any
result for the special paths '.' and '..'.
"""
> for name in self._accessor.listdir(self):
E FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_relative_directory_0/project/dist'
/usr/local/lib/python3.9/pathlib.py:1160: FileNotFoundError