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
030af110
Unverified
Commit
030af110
authored
Aug 08, 2019
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve to pip freeze call in InstalledRepository
parent
72c96a81
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
poetry/repositories/installed_repository.py
+1
-1
tests/repositories/test_installed_repository.py
+2
-2
No files found.
poetry/repositories/installed_repository.py
View file @
030af110
...
@@ -16,7 +16,7 @@ class InstalledRepository(Repository):
...
@@ -16,7 +16,7 @@ class InstalledRepository(Repository):
"""
"""
repo
=
cls
()
repo
=
cls
()
freeze_output
=
env
.
run
(
"pip"
,
"freeze"
)
freeze_output
=
env
.
run
(
"p
ython"
,
"-m"
,
"p
ip"
,
"freeze"
)
for
line
in
freeze_output
.
split
(
"
\n
"
):
for
line
in
freeze_output
.
split
(
"
\n
"
):
if
"=="
in
line
:
if
"=="
in
line
:
name
,
version
=
re
.
split
(
"={2,3}"
,
line
)
name
,
version
=
re
.
split
(
"={2,3}"
,
line
)
...
...
tests/repositories/test_installed_repository.py
View file @
030af110
...
@@ -10,10 +10,10 @@ orator===0.9.8
...
@@ -10,10 +10,10 @@ orator===0.9.8
class
MockEnv
(
BaseMockEnv
):
class
MockEnv
(
BaseMockEnv
):
def
run
(
self
,
bin
,
*
args
):
def
run
(
self
,
bin
,
*
args
):
if
bin
==
"p
ip"
and
args
[
0
]
==
"freeze"
:
if
bin
==
"p
ython"
and
args
[:
3
]
==
(
"-m"
,
"pip"
,
"freeze"
)
:
return
FREEZE_RESULTS
return
FREEZE_RESULTS
super
(
MockEnv
,
self
)
.
run
(
bin
,
*
args
)
return
super
(
MockEnv
,
self
)
.
run
(
bin
,
*
args
)
def
test_load
():
def
test_load
():
...
...
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