Switch init pyproject to dulwich#10849
Task Summary
Instruction pytest failed in 02:30
Details
✅ 00:04 clone
✅ 01:17 bootstrap_poetry
✅ 00:45 setup_environment
❌ 02:30 pytest
SKIPPED [1] tests/console/commands/test_sync.py:26: Only relevant for `poetry install`
SKIPPED [1] tests/console/commands/test_run.py:158: Poetry only installs CMD script files for console scripts of editable dependencies on Windows
FAILED tests/console/commands/test_init.py::test_package_include[mypackage-None] - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_init_existing_pyproject_consistent_linesep[\n] - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_basic_interactive - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_package_include[my-awesome-package-my_awesome_package] - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_predefined_and_interactive_dependencies - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_interactive_with_git_dependencies_and_other_name - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_interactive_with_git_dependencies_with_reference - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_interactive_with_directory_dependency - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_interactive_with_directory_dependency_and_other_name - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_init_does_not_create_project_structure_in_non_empty_directory - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_package_include[my.awesome.package-my] - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_init_existing_pyproject_simple - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_interactive_with_dependencies_and_no_selection - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_interactive_with_git_dependencies - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_package_include[my.package-my] - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_interactive_with_wrong_dependency_inputs - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_noninteractive - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_predefined_dev_dependency - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_python_option - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_predefined_and_interactive_dev_dependencies - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_package_include[my-package-my_package] - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_init_adds_readme_key_when_readme_exists - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_init_does_not_create_project_structure_in_empty_directory - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_init_does_not_add_readme_key_when_readme_missing - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_interactive_with_file_dependency - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_interactive_with_dependencies - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_init_existing_pyproject_consistent_linesep[\r\n] - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_predefined_dependency - KeyError: 'name'
FAILED tests/console/commands/test_init.py::test_empty_license - KeyError: 'name'
FAILED tests/console/commands/test_new.py::test_command_new[options11-package-namespace-package-src/namespace/package-src] - KeyError: 'name'
FAILED tests/console/commands/test_new.py::test_command_new_with_readme[md] - KeyError: 'name'
FAILED tests/console/commands/test_new.py::test_basic_interactive_new - KeyError: 'name'
FAILED tests/console/commands/test_new.py::test_command_new[options10-package-namespace-package-namespace/package-None] - KeyError: 'name'
FAILED tests/console/commands/test_new.py::test_respect_use_poetry_python_on_new[True-3.11] - KeyError: 'name'
FAILED tests/console/commands/test_new.py::test_command_new[options0-package-package-package-None] - KeyError: 'name'
FAILED tests/console/commands/test_new.py::test_command_new_with_readme[None] - KeyError: 'name'
FAILED tests/console/commands/test_new.py::test_command_new[options6-namespace-package-namespace-package-namespace_package-None] - KeyError: 'name'
FAILED tests/console/commands/test_new.py::test_command_new[options12-namespace_package-namespace-package-namespace_package-None] - KeyError: 'name'
FAILED tests/console/commands/test_new.py::test_command_new[options1-package-package-src/package-src] - KeyError: 'name'
FAILED tests/console/commands/test_new.py::test_command_new[options7-namespace-package-namespace-package-src/namespace_package-src] - KeyError: 'name'
FAILED tests/console/commands/test_new.py::test_command_new[options3-namespace-package-namespace-package-src/namespace/package-src] - KeyError: 'name'
FAILED tests/console/commands/test_new.py::test_command_new[options13-namespace_package-namespace-package-src/namespace_package-src] - KeyError: 'name'
FAILED tests/console/commands/test_new.py::test_command_new_with_readme[creole] - KeyError: 'name'
FAILED tests/console/commands/test_new.py::test_command_new[options2-namespace-package-namespace-package-namespace/package-None] - KeyError: 'name'
FAILED tests/console/commands/test_new.py::test_command_new_with_readme[adoc] - KeyError: 'name'
FAILED tests/console/commands/test_new.py::test_command_new[options9-package-namespace-package-src/namespace/package-src] - KeyError: 'name'
FAILED tests/console/commands/test_new.py::test_respect_use_poetry_python_on_new[False-1.1] - KeyError: 'name'
FAILED tests/console/commands/test_new.py::test_new_creates_structure_in_empty_existing_directory - KeyError: 'name'
FAILED tests/console/commands/test_new.py::test_new_with_dot_in_empty_directory - KeyError: 'name'
FAILED tests/console/commands/test_new.py::test_command_new[options8-package-namespace-package-namespace/package-None] - KeyError: 'name'
FAILED tests/console/commands/test_new.py::test_command_new[options5-namespace-package_a-namespace-package-a-src/namespace/package_a-src] - KeyError: 'name'
FAILED tests/console/commands/test_new.py::test_command_new_with_readme[rst] - KeyError: 'name'
FAILED tests/console/commands/test_new.py::test_command_new[options4-namespace-package_a-namespace-package-a-namespace/package_a-None] - KeyError: 'name'
=========== 53 failed, 3131 passed, 29 skipped in 147.07s (0:02:27) ============Annotations
Check failure on line 1082 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L1082
tests.console.commands.test_init.test_package_include[mypackage-None]
Raw output
tester = <cleo.testers.command_tester.CommandTester object at 0xe4c415d6ed0>
package_name = 'mypackage', include = None
@pytest.mark.parametrize(
"package_name, include",
(
("mypackage", None),
("my-package", "my_package"),
("my.package", "my"),
("my-awesome-package", "my_awesome_package"),
("my.awesome.package", "my"),
),
)
def test_package_include(
tester: CommandTester,
package_name: str,
include: str | None,
) -> None:
> tester.execute(
inputs="\n".join(
(
package_name,
"", # Version
"", # Description
"poetry", # Author
"", # License
">=3.10", # Python
"n", # Interactive packages
"n", # Interactive dev packages
"\n", # Generate
),
),
)
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:1082:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError
Check failure on line 927 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L927
tests.console.commands.test_init.test_init_existing_pyproject_consistent_linesep[\n]
Raw output
tester = <cleo.testers.command_tester.CommandTester object at 0xe4c42104f90>
source_dir = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_init_existing_pyproject_c0')
init_basic_inputs = 'my-package\n1.2.3\nThis is a description\nn\nMIT\n>=3.6\nn\nn\n\n'
init_basic_toml_no_readme = '[project]\nname = "my-package"\nversion = "1.2.3"\ndescription = "This is a description"\nauthors = [\n {name = "Your Name",email = "you@example.com"}\n]\nlicense = "MIT"\nrequires-python = ">=3.6"'
linesep = '\n'
@pytest.mark.parametrize("linesep", ["\n", "\r\n"])
def test_init_existing_pyproject_consistent_linesep(
tester: CommandTester,
source_dir: Path,
init_basic_inputs: str,
init_basic_toml_no_readme: str,
linesep: str,
) -> None:
pyproject_file = source_dir / "pyproject.toml"
existing_section = """
[tool.black]
line-length = 88
""".replace("\n", linesep)
with open(pyproject_file, "w", newline="", encoding="utf-8") as f:
f.write(existing_section)
> tester.execute(inputs=init_basic_inputs)
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:927:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError
Check failure on line 67 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L67
tests.console.commands.test_init.test_basic_interactive
Raw output
tester = <cleo.testers.command_tester.CommandTester object at 0xe4c430bf010>
init_basic_inputs = 'my-package\n1.2.3\nThis is a description\nn\nMIT\n>=3.6\nn\nn\n\n'
init_basic_toml_no_readme = '[project]\nname = "my-package"\nversion = "1.2.3"\ndescription = "This is a description"\nauthors = [\n {name = "Your Name",email = "you@example.com"}\n]\nlicense = "MIT"\nrequires-python = ">=3.6"'
def test_basic_interactive(
tester: CommandTester, init_basic_inputs: str, init_basic_toml_no_readme: str
) -> None:
> tester.execute(inputs=init_basic_inputs)
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:67:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError
Check failure on line 1082 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L1082
tests.console.commands.test_init.test_package_include[my-awesome-package-my_awesome_package]
Raw output
tester = <cleo.testers.command_tester.CommandTester object at 0xe4c4206ea50>
package_name = 'my-awesome-package', include = 'my_awesome_package'
@pytest.mark.parametrize(
"package_name, include",
(
("mypackage", None),
("my-package", "my_package"),
("my.package", "my"),
("my-awesome-package", "my_awesome_package"),
("my.awesome.package", "my"),
),
)
def test_package_include(
tester: CommandTester,
package_name: str,
include: str | None,
) -> None:
> tester.execute(
inputs="\n".join(
(
package_name,
"", # Version
"", # Description
"poetry", # Author
"", # License
">=3.10", # Python
"n", # Interactive packages
"n", # Interactive dev packages
"\n", # Generate
),
),
)
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:1082:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError
Check failure on line 726 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L726
tests.console.commands.test_init.test_predefined_and_interactive_dependencies
Raw output
tester = <cleo.testers.command_tester.CommandTester object at 0xe4c420328d0>
repo = <tests.helpers.DummyRepository object at 0xe4c42e3a750>
def test_predefined_and_interactive_dependencies(
tester: CommandTester, repo: DummyRepository
) -> None:
repo.add_package(get_package("pendulum", "2.0.0"))
repo.add_package(get_package("pyramid", "1.10"))
inputs = [
"my-package", # Package name
"1.2.3", # Version
"This is a description", # Description
"n", # Author
"MIT", # License
">=3.6", # Python
"", # Interactive packages
"pyramid", # Search for package
"0", # First option
"", # Do not set constraint
"", # Stop searching for packages
"n", # Interactive dev packages
"\n", # Generate
]
> tester.execute("--dependency pendulum", inputs="\n".join(inputs))
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:726:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError
Check failure on line 405 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L405
tests.console.commands.test_init.test_interactive_with_git_dependencies_and_other_name
Raw output
tester = <cleo.testers.command_tester.CommandTester object at 0xe4c430ef5d0>
repo = <tests.helpers.DummyRepository object at 0xe4c41108890>
def test_interactive_with_git_dependencies_and_other_name(
tester: CommandTester, repo: DummyRepository
) -> None:
repo.add_package(get_package("pendulum", "2.0.0"))
repo.add_package(get_package("pytest", "3.6.0"))
inputs = [
"my-package", # Package name
"1.2.3", # Version
"This is a description", # Description
"n", # Author
"MIT", # License
">=3.6", # Python
"", # Interactive packages
"git+https://github.com/demo/pyproject-demo.git", # Search for package
"", # Stop searching for packages
"", # Interactive dev packages
"pytest", # Search for package
"0",
"",
"",
"\n", # Generate
]
> tester.execute(inputs="\n".join(inputs))
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:405:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError
Check failure on line 357 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L357
tests.console.commands.test_init.test_interactive_with_git_dependencies_with_reference
Raw output
tester = <cleo.testers.command_tester.CommandTester object at 0xe4c4110add0>
repo = <tests.helpers.DummyRepository object at 0xe4c4201cf50>
def test_interactive_with_git_dependencies_with_reference(
tester: CommandTester, repo: DummyRepository
) -> None:
repo.add_package(get_package("pendulum", "2.0.0"))
repo.add_package(get_package("pytest", "3.6.0"))
inputs = [
"my-package", # Package name
"1.2.3", # Version
"This is a description", # Description
"n", # Author
"MIT", # License
">=3.6", # Python
"", # Interactive packages
"git+https://github.com/demo/demo.git@develop", # Search for package
"", # Stop searching for packages
"", # Interactive dev packages
"pytest", # Search for package
"0",
"",
"",
"\n", # Generate
]
> tester.execute(inputs="\n".join(inputs))
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:357:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError
Check failure on line 459 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L459
tests.console.commands.test_init.test_interactive_with_directory_dependency
Raw output
tester = <cleo.testers.command_tester.CommandTester object at 0xe4c4213d850>
repo = <tests.helpers.DummyRepository object at 0xe4c4211d5d0>
source_dir = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_interactive_with_director0')
fixture_dir = <function fixture_dir.<locals>._fixture_dir at 0xe4c42f6b240>
def test_interactive_with_directory_dependency(
tester: CommandTester,
repo: DummyRepository,
source_dir: Path,
fixture_dir: FixtureDirGetter,
) -> None:
repo.add_package(get_package("pendulum", "2.0.0"))
repo.add_package(get_package("pytest", "3.6.0"))
demo = fixture_dir("git") / "github.com" / "demo" / "demo"
shutil.copytree(str(demo), str(source_dir / "demo"))
inputs = [
"my-package", # Package name
"1.2.3", # Version
"This is a description", # Description
"n", # Author
"MIT", # License
">=3.6", # Python
"", # Interactive packages
"./demo", # Search for package
"", # Stop searching for packages
"", # Interactive dev packages
"pytest", # Search for package
"0",
"",
"",
"\n", # Generate
]
> tester.execute(inputs="\n".join(inputs))
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:459:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError
Check failure on line 513 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L513
tests.console.commands.test_init.test_interactive_with_directory_dependency_and_other_name
Raw output
tester = <cleo.testers.command_tester.CommandTester object at 0xe4c43b95590>
repo = <tests.helpers.DummyRepository object at 0xe4c41f1ac10>
source_dir = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_interactive_with_director1')
fixture_dir = <function fixture_dir.<locals>._fixture_dir at 0xe4c42f6b240>
def test_interactive_with_directory_dependency_and_other_name(
tester: CommandTester,
repo: DummyRepository,
source_dir: Path,
fixture_dir: FixtureDirGetter,
) -> None:
repo.add_package(get_package("pendulum", "2.0.0"))
repo.add_package(get_package("pytest", "3.6.0"))
demo = fixture_dir("git") / "github.com" / "demo" / "pyproject-demo"
shutil.copytree(str(demo), str(source_dir / "pyproject-demo"))
inputs = [
"my-package", # Package name
"1.2.3", # Version
"This is a description", # Description
"n", # Author
"MIT", # License
">=3.6", # Python
"", # Interactive packages
"./pyproject-demo", # Search for package
"", # Stop searching for packages
"", # Interactive dev packages
"pytest", # Search for package
"0",
"",
"",
"\n", # Generate
]
> tester.execute(inputs="\n".join(inputs))
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:513:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError
Check failure on line 1212 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L1212
tests.console.commands.test_init.test_init_does_not_create_project_structure_in_non_empty_directory
Raw output
tester = <cleo.testers.command_tester.CommandTester object at 0xe4c4203e5d0>
source_dir = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_init_does_not_create_proj0')
def test_init_does_not_create_project_structure_in_non_empty_directory(
tester: CommandTester, source_dir: Path
) -> None:
"""Test that poetry init does not create project structure in non-empty directory."""
# Create some existing files
(source_dir / "existing_file.txt").write_text("existing content", encoding="utf-8")
(source_dir / "existing_dir").mkdir()
inputs = [
"my-package", # Package name
"1.0.0", # Version
"", # Description
"n", # Author
"", # License
"", # Python
"n", # Interactive packages
"n", # Interactive dev packages
"\n", # Generate
]
> tester.execute(inputs="\n".join(inputs))
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:1212:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError
Check failure on line 1082 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L1082
tests.console.commands.test_init.test_package_include[my.awesome.package-my]
Raw output
tester = <cleo.testers.command_tester.CommandTester object at 0xe4c43d4d050>
package_name = 'my.awesome.package', include = 'my'
@pytest.mark.parametrize(
"package_name, include",
(
("mypackage", None),
("my-package", "my_package"),
("my.package", "my"),
("my-awesome-package", "my_awesome_package"),
("my.awesome.package", "my"),
),
)
def test_package_include(
tester: CommandTester,
package_name: str,
include: str | None,
) -> None:
> tester.execute(
inputs="\n".join(
(
package_name,
"", # Version
"", # Description
"poetry", # Author
"", # License
">=3.10", # Python
"n", # Interactive packages
"n", # Interactive dev packages
"\n", # Generate
),
),
)
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:1082:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError
Check failure on line 905 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L905
tests.console.commands.test_init.test_init_existing_pyproject_simple
Raw output
tester = <cleo.testers.command_tester.CommandTester object at 0xe4c43d73a10>
source_dir = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_init_existing_pyproject_s0')
init_basic_inputs = 'my-package\n1.2.3\nThis is a description\nn\nMIT\n>=3.6\nn\nn\n\n'
init_basic_toml_no_readme = '[project]\nname = "my-package"\nversion = "1.2.3"\ndescription = "This is a description"\nauthors = [\n {name = "Your Name",email = "you@example.com"}\n]\nlicense = "MIT"\nrequires-python = ">=3.6"'
def test_init_existing_pyproject_simple(
tester: CommandTester,
source_dir: Path,
init_basic_inputs: str,
init_basic_toml_no_readme: str,
) -> None:
pyproject_file = source_dir / "pyproject.toml"
existing_section = """
[tool.black]
line-length = 88
"""
pyproject_file.write_text(existing_section, encoding="utf-8")
> tester.execute(inputs=init_basic_inputs)
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:905:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError
Check failure on line 195 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L195
tests.console.commands.test_init.test_interactive_with_dependencies_and_no_selection
Raw output
tester = <cleo.testers.command_tester.CommandTester object at 0xe4c420f8f10>
repo = <tests.helpers.DummyRepository object at 0xe4c42e7c6d0>
def test_interactive_with_dependencies_and_no_selection(
tester: CommandTester, repo: DummyRepository
) -> None:
repo.add_package(get_package("django-pendulum", "0.1.6-pre4"))
repo.add_package(get_package("pendulum", "2.0.0"))
repo.add_package(get_package("pytest", "3.6.0"))
inputs = [
"my-package", # Package name
"1.2.3", # Version
"This is a description", # Description
"n", # Author
"MIT", # License
">=3.6", # Python
"", # Interactive packages
"pendulu", # Search for package
"", # Do not select an option
"", # Stop searching for packages
"", # Interactive dev packages
"pytest", # Search for package
"", # Do not select an option
"",
"",
"\n", # Generate
]
> tester.execute(inputs="\n".join(inputs))
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError
Check failure on line 262 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L262
tests.console.commands.test_init.test_interactive_with_git_dependencies
Raw output
tester = <cleo.testers.command_tester.CommandTester object at 0xe4c43c629d0>
repo = <tests.helpers.DummyRepository object at 0xe4c420008d0>
def test_interactive_with_git_dependencies(
tester: CommandTester, repo: DummyRepository
) -> None:
repo.add_package(get_package("pendulum", "2.0.0"))
repo.add_package(get_package("pytest", "3.6.0"))
inputs = [
"my-package", # Package name
"1.2.3", # Version
"This is a description", # Description
"n", # Author
"MIT", # License
">=3.6", # Python
"", # Interactive packages
"git+https://github.com/demo/demo.git", # Search for package
"", # Stop searching for packages
"", # Interactive dev packages
"pytest", # Search for package
"0",
"",
"",
"\n", # Generate
]
> tester.execute(inputs="\n".join(inputs))
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:262:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError
Check failure on line 1082 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L1082
tests.console.commands.test_init.test_package_include[my.package-my]
Raw output
tester = <cleo.testers.command_tester.CommandTester object at 0xe4c43e49890>
package_name = 'my.package', include = 'my'
@pytest.mark.parametrize(
"package_name, include",
(
("mypackage", None),
("my-package", "my_package"),
("my.package", "my"),
("my-awesome-package", "my_awesome_package"),
("my.awesome.package", "my"),
),
)
def test_package_include(
tester: CommandTester,
package_name: str,
include: str | None,
) -> None:
> tester.execute(
inputs="\n".join(
(
package_name,
"", # Version
"", # Description
"poetry", # Author
"", # License
">=3.10", # Python
"n", # Interactive packages
"n", # Interactive dev packages
"\n", # Generate
),
),
)
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:1082:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError
Check failure on line 616 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L616
tests.console.commands.test_init.test_interactive_with_wrong_dependency_inputs
Raw output
tester = <cleo.testers.command_tester.CommandTester object at 0xe4c42237490>
repo = <tests.helpers.DummyRepository object at 0xe4c43c90810>
def test_interactive_with_wrong_dependency_inputs(
tester: CommandTester, repo: DummyRepository
) -> None:
inputs = [
"my-package", # Package name
"1.2.3", # Version
"This is a description", # Description
"n", # Author
"MIT", # License
">=3.8", # Python
"", # Interactive packages
"foo 1.19.2",
"pendulum 2.0.0 foo", # Package name and constraint (invalid)
"pendulum@^2.0.0", # Package name and constraint (valid)
"", # End package selection
"", # Interactive dev packages
"pytest 3.6.0 foo", # Dev package name and constraint (invalid)
"pytest 3.6.0", # Dev package name and constraint (invalid)
"pytest@3.6.0", # Dev package name and constraint (valid)
"", # End package selection
"\n", # Generate
]
> tester.execute(inputs="\n".join(inputs))
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:616:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError
Check failure on line 89 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L89
tests.console.commands.test_init.test_noninteractive
Raw output
app = <tests.helpers.PoetryTestApplication object at 0xe4c43c913d0>
mocker = <pytest_mock.plugin.MockerFixture object at 0xe4c4213fd50>
poetry = <poetry.poetry.Poetry object at 0xe4c42221c50>
repo = <tests.helpers.DummyRepository object at 0xe4c43c8dfd0>
tmp_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_noninteractive0')
def test_noninteractive(
app: PoetryTestApplication,
mocker: MockerFixture,
poetry: Poetry,
repo: DummyRepository,
tmp_path: Path,
) -> None:
command = app.find("init")
assert isinstance(command, InitCommand)
command._pool = poetry.pool
repo.add_package(get_package("pytest", "3.6.0"))
p = mocker.patch("pathlib.Path.cwd")
p.return_value = tmp_path
tester = CommandTester(command)
args = "--name my-package --dependency pytest"
> tester.execute(args=args, interactive=False)
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:89:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError
Check failure on line 763 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L763
tests.console.commands.test_init.test_predefined_dev_dependency
Raw output
tester = <cleo.testers.command_tester.CommandTester object at 0xe4c42222fd0>
repo = <tests.helpers.DummyRepository object at 0xe4c420326d0>
def test_predefined_dev_dependency(
tester: CommandTester, repo: DummyRepository
) -> None:
repo.add_package(get_package("pytest", "3.6.0"))
inputs = [
"my-package", # Package name
"1.2.3", # Version
"This is a description", # Description
"n", # Author
"MIT", # License
">=3.6", # Python
"n", # Interactive packages
"n", # Interactive dev packages
"\n", # Generate
]
> tester.execute("--dev-dependency pytest", inputs="\n".join(inputs))
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:763:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError
Check failure on line 653 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L653
tests.console.commands.test_init.test_python_option
Raw output
tester = <cleo.testers.command_tester.CommandTester object at 0xe4c421ba690>
def test_python_option(tester: CommandTester) -> None:
inputs = [
"my-package", # Package name
"1.2.3", # Version
"This is a description", # Description
"n", # Author
"MIT", # License
"n", # Interactive packages
"n", # Interactive dev packages
"\n", # Generate
]
> tester.execute("--python '>=3.6'", inputs="\n".join(inputs))
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:653:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError
Check failure on line 809 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L809
tests.console.commands.test_init.test_predefined_and_interactive_dev_dependencies
Raw output
tester = <cleo.testers.command_tester.CommandTester object at 0xe4c42e3dd10>
repo = <tests.helpers.DummyRepository object at 0xe4c43bc4250>
def test_predefined_and_interactive_dev_dependencies(
tester: CommandTester, repo: DummyRepository
) -> None:
repo.add_package(get_package("pytest", "3.6.0"))
repo.add_package(get_package("pytest-requests", "0.2.0"))
inputs = [
"my-package", # Package name
"1.2.3", # Version
"This is a description", # Description
"n", # Author
"MIT", # License
">=3.6", # Python
"n", # Interactive packages
"", # Interactive dev packages
"pytest-requests", # Search for package
"0", # Select first option
"", # Do not set constraint
"", # Stop searching for dev packages
"\n", # Generate
]
> tester.execute("--dev-dependency pytest", inputs="\n".join(inputs))
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:809:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError
Check failure on line 1082 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L1082
tests.console.commands.test_init.test_package_include[my-package-my_package]
Raw output
tester = <cleo.testers.command_tester.CommandTester object at 0xe4c43b90b50>
package_name = 'my-package', include = 'my_package'
@pytest.mark.parametrize(
"package_name, include",
(
("mypackage", None),
("my-package", "my_package"),
("my.package", "my"),
("my-awesome-package", "my_awesome_package"),
("my.awesome.package", "my"),
),
)
def test_package_include(
tester: CommandTester,
package_name: str,
include: str | None,
) -> None:
> tester.execute(
inputs="\n".join(
(
package_name,
"", # Version
"", # Description
"poetry", # Author
"", # License
">=3.10", # Python
"n", # Interactive packages
"n", # Interactive dev packages
"\n", # Generate
),
),
)
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:1082:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError
Check failure on line 1235 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L1235
tests.console.commands.test_init.test_init_adds_readme_key_when_readme_exists
Raw output
tester = <cleo.testers.command_tester.CommandTester object at 0xe4c43c8f150>
tmp_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_init_adds_readme_key_when0')
def test_init_adds_readme_key_when_readme_exists(
tester: CommandTester, tmp_path: Path
) -> None:
# Arrange: ensure README.md exists
readme = tmp_path / "README.md"
readme.write_text("# My Project\n", encoding="utf-8")
# Act
> tester.execute(interactive=False)
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:1235:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError
Check failure on line 1180 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L1180
tests.console.commands.test_init.test_init_does_not_create_project_structure_in_empty_directory
Raw output
tester = <cleo.testers.command_tester.CommandTester object at 0xe4c43bba750>
source_dir = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_init_does_not_create_proj1')
def test_init_does_not_create_project_structure_in_empty_directory(
tester: CommandTester, source_dir: Path
) -> None:
"""Test that poetry init does not create project structure in empty directory."""
inputs = [
"my-package", # Package name
"1.0.0", # Version
"", # Description
"n", # Author
"", # License
"", # Python
"n", # Interactive packages
"n", # Interactive dev packages
"\n", # Generate
]
> tester.execute(inputs="\n".join(inputs))
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:1180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError
Check failure on line 1248 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L1248
tests.console.commands.test_init.test_init_does_not_add_readme_key_when_readme_missing
Raw output
tester = <cleo.testers.command_tester.CommandTester object at 0xe4c43e8c990>
tmp_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_init_does_not_add_readme_0')
def test_init_does_not_add_readme_key_when_readme_missing(
tester: CommandTester, tmp_path: Path
) -> None:
# Arrange: ensure README.md does NOT exist
readme = tmp_path / "README.md"
assert not readme.exists()
# Act
> tester.execute(interactive=False)
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:1248:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError
Check failure on line 568 in tests/console/commands/test_init.py
cirrus-ci / Tests / FreeBSD (Python 3.11) / pytest
tests/console/commands/test_init.py#L568
tests.console.commands.test_init.test_interactive_with_file_dependency
Raw output
tester = <cleo.testers.command_tester.CommandTester object at 0xe4c43e4bed0>
repo = <tests.helpers.DummyRepository object at 0xe4c42e38e10>
source_dir = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_interactive_with_file_dep0')
fixture_dir = <function fixture_dir.<locals>._fixture_dir at 0xe4c42f6b240>
def test_interactive_with_file_dependency(
tester: CommandTester,
repo: DummyRepository,
source_dir: Path,
fixture_dir: FixtureDirGetter,
) -> None:
repo.add_package(get_package("pendulum", "2.0.0"))
repo.add_package(get_package("pytest", "3.6.0"))
demo = fixture_dir("distributions") / "demo-0.1.0-py2.py3-none-any.whl"
shutil.copyfile(str(demo), str(source_dir / demo.name))
inputs = [
"my-package", # Package name
"1.2.3", # Version
"This is a description", # Description
"n", # Author
"MIT", # License
">=3.6", # Python
"", # Interactive packages
"./demo-0.1.0-py2.py3-none-any.whl", # Search for package
"", # Stop searching for packages
"", # Interactive dev packages
"pytest", # Search for package
"0",
"",
"",
"\n", # Generate
]
> tester.execute(inputs="\n".join(inputs))
/tmp/cirrus-ci-build/tests/console/commands/test_init.py:568:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
^^^^^^^^^^^^^^^^
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:84: in handle
return self._init_pyproject(project_path=project_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/cirrus-ci-build/src/poetry/console/commands/init.py:151: in _init_pyproject
if not author and (vcs_username := vcs_config.get("user", "name")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <StackedConfig for []>, section = ('user',), name = 'name'
def get(self, section: SectionLike, name: NameLike) -> Value:
"""Get value from configuration."""
if not isinstance(section, tuple):
section = (section,)
for backend in self.backends:
try:
return backend.get(section, name)
except KeyError:
pass
> raise KeyError(name)
E KeyError: 'name'
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.11/lib/python3.11/site-packages/dulwich/config.py:1506: KeyError