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
95e3490a
Unverified
Commit
95e3490a
authored
Apr 19, 2020
by
Arun Babu Neelicattu
Committed by
GitHub
Apr 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update importlib-metadata, virtualenv and keyring dependency package (#2320)
parent
d09cfce7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
11 deletions
+35
-11
poetry.lock
+0
-0
pyproject.toml
+4
-3
tests/conftest.py
+15
-0
tests/console/commands/test_init.py
+16
-8
No files found.
poetry.lock
View file @
95e3490a
This diff is collapsed.
Click to expand it.
pyproject.toml
View file @
95e3490a
...
@@ -44,16 +44,17 @@ pathlib2 = { version = "^2.3", python = "~2.7" }
...
@@ -44,16 +44,17 @@ pathlib2 = { version = "^2.3", python = "~2.7" }
# Use glob2 for Python 2.7 and 3.4
# Use glob2 for Python 2.7 and 3.4
glob2
=
{
version
=
"^0.6"
,
python
=
"~2.7"
}
glob2
=
{
version
=
"^0.6"
,
python
=
"~2.7"
}
# Use virtualenv for Python 2.7 since venv does not exist
# Use virtualenv for Python 2.7 since venv does not exist
virtualenv
=
{
version
=
"^
16.7.9
"
,
python
=
"~2.7"
}
virtualenv
=
{
version
=
"^
20.0.18
"
,
python
=
"~2.7"
}
# functools32 is needed for Python 2.7
# functools32 is needed for Python 2.7
functools32
=
{
version
=
"^3.2.3"
,
python
=
"~2.7"
}
functools32
=
{
version
=
"^3.2.3"
,
python
=
"~2.7"
}
keyring
=
[
keyring
=
[
{
version
=
"^18.0.1"
,
python
=
"~2.7"
}
,
{
version
=
"^18.0.1"
,
python
=
"~2.7"
}
,
{
version
=
"^20.0.1"
,
python
=
"^3.5"
}
{
version
=
"^20.0.1"
,
python
=
"~3.5"
}
,
{
version
=
"^21.2.0"
,
python
=
"^3.6"
}
]
]
# Use subprocess32 for Python 2.7
# Use subprocess32 for Python 2.7
subprocess32
=
{
version
=
"^3.5"
,
python
=
"~2.7"
}
subprocess32
=
{
version
=
"^3.5"
,
python
=
"~2.7"
}
importlib-metadata
=
{version
=
"
~1.1.3
"
,
python
=
"<3.8"
}
importlib-metadata
=
{version
=
"
^1.6.0
"
,
python
=
"<3.8"
}
[tool.poetry.dev-dependencies]
[tool.poetry.dev-dependencies]
pytest
=
"^4.1"
pytest
=
"^4.1"
...
...
tests/conftest.py
View file @
95e3490a
...
@@ -117,3 +117,18 @@ def tmp_dir():
...
@@ -117,3 +117,18 @@ def tmp_dir():
yield
dir_
yield
dir_
shutil
.
rmtree
(
dir_
)
shutil
.
rmtree
(
dir_
)
@pytest.fixture
def
mocked_open_files
(
mocker
):
files
=
[]
original
=
Path
.
open
def
mocked_open
(
self
,
*
args
,
**
kwargs
):
if
self
.
name
in
{
"pyproject.toml"
}:
return
mocker
.
MagicMock
()
return
original
(
self
,
*
args
,
**
kwargs
)
mocker
.
patch
(
"poetry.utils._compat.Path.open"
,
mocked_open
)
yield
files
tests/console/commands/test_init.py
View file @
95e3490a
...
@@ -137,14 +137,16 @@ python = "^{python}"
...
@@ -137,14 +137,16 @@ python = "^{python}"
assert
expected
in
tester
.
io
.
fetch_output
()
assert
expected
in
tester
.
io
.
fetch_output
()
def
test_interactive_with_git_dependencies
(
app
,
repo
,
mocker
,
poetry
):
def
test_interactive_with_git_dependencies
(
app
,
repo
,
mocker
,
poetry
,
mocked_open_files
):
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"
))
command
=
app
.
find
(
"init"
)
command
=
app
.
find
(
"init"
)
command
.
_pool
=
poetry
.
pool
command
.
_pool
=
poetry
.
pool
mocke
r
.
patch
(
"poetry.utils._compat.Path.open
"
)
mocke
d_open_files
.
append
(
"pyproject.toml
"
)
p
=
mocker
.
patch
(
"poetry.utils._compat.Path.cwd"
)
p
=
mocker
.
patch
(
"poetry.utils._compat.Path.cwd"
)
p
.
return_value
=
Path
(
__file__
)
.
parent
p
.
return_value
=
Path
(
__file__
)
.
parent
...
@@ -187,14 +189,16 @@ pytest = "^3.6.0"
...
@@ -187,14 +189,16 @@ pytest = "^3.6.0"
assert
expected
in
tester
.
io
.
fetch_output
()
assert
expected
in
tester
.
io
.
fetch_output
()
def
test_interactive_with_git_dependencies_with_reference
(
app
,
repo
,
mocker
,
poetry
):
def
test_interactive_with_git_dependencies_with_reference
(
app
,
repo
,
mocker
,
poetry
,
mocked_open_files
):
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"
))
command
=
app
.
find
(
"init"
)
command
=
app
.
find
(
"init"
)
command
.
_pool
=
poetry
.
pool
command
.
_pool
=
poetry
.
pool
mocke
r
.
patch
(
"poetry.utils._compat.Path.open
"
)
mocke
d_open_files
.
append
(
"pyproject.toml
"
)
p
=
mocker
.
patch
(
"poetry.utils._compat.Path.cwd"
)
p
=
mocker
.
patch
(
"poetry.utils._compat.Path.cwd"
)
p
.
return_value
=
Path
(
__file__
)
.
parent
p
.
return_value
=
Path
(
__file__
)
.
parent
...
@@ -237,14 +241,16 @@ pytest = "^3.6.0"
...
@@ -237,14 +241,16 @@ pytest = "^3.6.0"
assert
expected
in
tester
.
io
.
fetch_output
()
assert
expected
in
tester
.
io
.
fetch_output
()
def
test_interactive_with_git_dependencies_and_other_name
(
app
,
repo
,
mocker
,
poetry
):
def
test_interactive_with_git_dependencies_and_other_name
(
app
,
repo
,
mocker
,
poetry
,
mocked_open_files
):
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"
))
command
=
app
.
find
(
"init"
)
command
=
app
.
find
(
"init"
)
command
.
_pool
=
poetry
.
pool
command
.
_pool
=
poetry
.
pool
mocke
r
.
patch
(
"poetry.utils._compat.Path.open
"
)
mocke
d_open_files
.
append
(
"pyproject.toml
"
)
p
=
mocker
.
patch
(
"poetry.utils._compat.Path.cwd"
)
p
=
mocker
.
patch
(
"poetry.utils._compat.Path.cwd"
)
p
.
return_value
=
Path
(
__file__
)
.
parent
p
.
return_value
=
Path
(
__file__
)
.
parent
...
@@ -287,14 +293,16 @@ pytest = "^3.6.0"
...
@@ -287,14 +293,16 @@ pytest = "^3.6.0"
assert
expected
in
tester
.
io
.
fetch_output
()
assert
expected
in
tester
.
io
.
fetch_output
()
def
test_interactive_with_directory_dependency
(
app
,
repo
,
mocker
,
poetry
):
def
test_interactive_with_directory_dependency
(
app
,
repo
,
mocker
,
poetry
,
mocked_open_files
):
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"
))
command
=
app
.
find
(
"init"
)
command
=
app
.
find
(
"init"
)
command
.
_pool
=
poetry
.
pool
command
.
_pool
=
poetry
.
pool
mocke
r
.
patch
(
"poetry.utils._compat.Path.open
"
)
mocke
d_open_files
.
append
(
"pyproject.toml
"
)
p
=
mocker
.
patch
(
"poetry.utils._compat.Path.cwd"
)
p
=
mocker
.
patch
(
"poetry.utils._compat.Path.cwd"
)
p
.
return_value
=
Path
(
__file__
)
.
parent
p
.
return_value
=
Path
(
__file__
)
.
parent
...
...
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