Commit 5dd5411e by thomaszub Committed by finswimmer

Fixed dependency name set to search string

parent 314fc27c
...@@ -262,6 +262,10 @@ The <c1>init</c1> command creates a basic <comment>pyproject.toml</> file in the ...@@ -262,6 +262,10 @@ The <c1>init</c1> command creates a basic <comment>pyproject.toml</> file in the
attempts=3, attempts=3,
) )
# package selected by user, set constraint name to package name
if package is not False:
constraint["name"] = package
# no constraint yet, determine the best version automatically # no constraint yet, determine the best version automatically
if package is not False and "version" not in constraint: if package is not False and "version" not in constraint:
question = self.create_question( question = self.create_question(
......
...@@ -46,6 +46,7 @@ python = "~2.7 || ^3.6" ...@@ -46,6 +46,7 @@ python = "~2.7 || ^3.6"
def test_interactive_with_dependencies(app, repo, mocker, poetry): def test_interactive_with_dependencies(app, repo, mocker, poetry):
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("pendulum", "2.0.0"))
repo.add_package(get_package("pytest", "3.6.0")) repo.add_package(get_package("pytest", "3.6.0"))
...@@ -65,8 +66,8 @@ def test_interactive_with_dependencies(app, repo, mocker, poetry): ...@@ -65,8 +66,8 @@ def test_interactive_with_dependencies(app, repo, mocker, poetry):
"MIT", # License "MIT", # License
"~2.7 || ^3.6", # Python "~2.7 || ^3.6", # Python
"", # Interactive packages "", # Interactive packages
"pendulum", # Search for package "pendulu", # Search for package
"0", # First option "1", # Second option is pendulum
"", # Do not set constraint "", # Do not set constraint
"", # Stop searching for packages "", # Stop searching for packages
"", # Interactive dev packages "", # Interactive dev packages
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment