Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
8c3d49f5
Unverified
Commit
8c3d49f5
authored
Jun 28, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not add pytest automatically in init
parent
f93d4861
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
6 deletions
+14
-6
CHANGELOG.md
+1
-0
poetry/console/commands/init.py
+2
-2
poetry/layouts/layout.py
+4
-1
tests/console/commands/test_init.py
+7
-3
No files found.
CHANGELOG.md
View file @
8c3d49f5
...
...
@@ -14,6 +14,7 @@
-
Improved solver error messages.
-
`poetry`
now always reads/writes the
`pyproject.toml`
file with the
`utf-8`
encoding.
-
`config --list`
now lists all available settings.
-
`init`
no longer adds
`pytest`
to development dependencies.
### Fixed
...
...
poetry/console/commands/init.py
View file @
8c3d49f5
...
...
@@ -106,7 +106,7 @@ The <info>init</info> command creates a basic <comment>pyproject.toml</> file in
self
.
line
(
""
)
requirements
=
[]
requirements
=
{}
question
=
"Would you like to define your dependencies"
" (require) interactively?"
if
self
.
confirm
(
question
,
True
):
...
...
@@ -114,7 +114,7 @@ The <info>init</info> command creates a basic <comment>pyproject.toml</> file in
self
.
_determine_requirements
(
self
.
option
(
"dependency"
))
)
dev_requirements
=
[]
dev_requirements
=
{}
question
=
"Would you like to define your dev dependencies"
" (require-dev) interactively"
if
self
.
confirm
(
question
,
True
):
...
...
poetry/layouts/layout.py
View file @
8c3d49f5
...
...
@@ -58,7 +58,10 @@ class Layout(object):
self
.
_license
=
license
self
.
_python
=
python
self
.
_dependencies
=
dependencies
or
{}
self
.
_dev_dependencies
=
dev_dependencies
or
{
"pytest"
:
"^3.5"
}
if
dev_dependencies
is
None
:
dev_dependencies
=
{
"pytest"
:
"^3.5"
}
self
.
_dev_dependencies
=
dev_dependencies
if
not
author
:
author
=
"Your Name <you@example.com>"
...
...
tests/console/commands/test_init.py
View file @
8c3d49f5
...
...
@@ -55,7 +55,6 @@ license = "MIT"
python = "~2.7 || ^3.6"
[tool.poetry.dev-dependencies]
pytest = "^3.5"
"""
assert
expected
in
output
...
...
@@ -63,6 +62,7 @@ pytest = "^3.5"
def
test_interactive_with_dependencies
(
app
,
repo
,
mocker
,
poetry
):
repo
.
add_package
(
get_package
(
"pendulum"
,
"2.0.0"
))
repo
.
add_package
(
get_package
(
"pytest"
,
"3.6.0"
))
command
=
app
.
find
(
"init"
)
command
.
_pool
=
poetry
.
pool
...
...
@@ -85,7 +85,11 @@ def test_interactive_with_dependencies(app, repo, mocker, poetry):
"0"
,
# First option
""
,
# Do not set constraint
""
,
# Stop searching for packages
"n"
,
# Interactive dev packages
""
,
# Interactive dev packages
"pytest"
,
# Search for package
"0"
,
""
,
""
,
"
\n
"
,
# Generate
]
)
...
...
@@ -105,7 +109,7 @@ python = "~2.7 || ^3.6"
pendulum = "^2.0"
[tool.poetry.dev-dependencies]
pytest = "^3.
5
"
pytest = "^3.
6
"
"""
assert
expected
in
output
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment