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
b99b455d
Unverified
Commit
b99b455d
authored
Feb 03, 2022
by
Randy Döring
Committed by
GitHub
Feb 03, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prefer actual-expected to expected-actual in assertions (#5129)
parent
bdb814d1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
159 additions
and
154 deletions
+159
-154
tests/console/commands/debug/test_resolve.py
+3
-3
tests/console/commands/env/test_info.py
+1
-1
tests/console/commands/env/test_list.py
+3
-3
tests/console/commands/env/test_remove.py
+5
-5
tests/console/commands/env/test_use.py
+3
-3
tests/console/commands/test_about.py
+1
-1
tests/console/commands/test_add.py
+0
-0
tests/console/commands/test_cache.py
+2
-2
tests/console/commands/test_check.py
+2
-2
tests/console/commands/test_config.py
+5
-5
tests/console/commands/test_export.py
+4
-4
tests/console/commands/test_search.py
+1
-1
tests/console/commands/test_show.py
+23
-22
tests/console/commands/test_version.py
+1
-1
tests/installation/test_chef.py
+1
-1
tests/installation/test_executor.py
+4
-4
tests/installation/test_installer.py
+4
-4
tests/installation/test_installer_old.py
+3
-3
tests/installation/test_pip_installer.py
+4
-4
tests/packages/test_locker.py
+7
-7
tests/puzzle/test_solver.py
+1
-1
tests/puzzle/test_transaction.py
+1
-1
tests/repositories/test_legacy_repository.py
+4
-4
tests/repositories/test_pypi_repository.py
+2
-2
tests/test_factory.py
+1
-1
tests/utils/test_env.py
+13
-10
tests/utils/test_exporter.py
+21
-21
tests/utils/test_extras.py
+3
-2
tests/utils/test_setup_reader.py
+36
-36
No files found.
tests/console/commands/debug/test_resolve.py
View file @
b99b455d
...
@@ -43,7 +43,7 @@ msgpack-python 0.5.3
...
@@ -43,7 +43,7 @@ msgpack-python 0.5.3
cachy 0.2.0
cachy 0.2.0
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_debug_resolve_tree_option_gives_the_dependency_tree
(
tester
:
"CommandTester"
):
def
test_debug_resolve_tree_option_gives_the_dependency_tree
(
tester
:
"CommandTester"
):
...
@@ -58,7 +58,7 @@ cachy 0.2.0
...
@@ -58,7 +58,7 @@ cachy 0.2.0
└── msgpack-python >=0.5 <0.6
└── msgpack-python >=0.5 <0.6
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_debug_resolve_git_dependency
(
tester
:
"CommandTester"
):
def
test_debug_resolve_git_dependency
(
tester
:
"CommandTester"
):
...
@@ -73,4 +73,4 @@ pendulum 2.0.3
...
@@ -73,4 +73,4 @@ pendulum 2.0.3
demo 0.1.2
demo 0.1.2
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
tests/console/commands/env/test_info.py
View file @
b99b455d
...
@@ -49,7 +49,7 @@ Path: {Path('/base/prefix')}
...
@@ -49,7 +49,7 @@ Path: {Path('/base/prefix')}
Executable: python
Executable: python
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_env_info_displays_path_only
(
tester
:
"CommandTester"
):
def
test_env_info_displays_path_only
(
tester
:
"CommandTester"
):
...
...
tests/console/commands/env/test_list.py
View file @
b99b455d
...
@@ -39,7 +39,7 @@ def test_none_activated(
...
@@ -39,7 +39,7 @@ def test_none_activated(
mocker
.
patch
(
"poetry.utils.env.EnvManager.get"
,
return_value
=
env
)
mocker
.
patch
(
"poetry.utils.env.EnvManager.get"
,
return_value
=
env
)
tester
.
execute
()
tester
.
execute
()
expected
=
"
\n
"
.
join
(
venvs_in_cache_dirs
)
.
strip
()
expected
=
"
\n
"
.
join
(
venvs_in_cache_dirs
)
.
strip
()
assert
expected
==
tester
.
io
.
fetch_output
()
.
strip
()
assert
tester
.
io
.
fetch_output
()
.
strip
()
==
expected
def
test_activated
(
def
test_activated
(
...
@@ -52,10 +52,10 @@ def test_activated(
...
@@ -52,10 +52,10 @@ def test_activated(
expected
=
(
expected
=
(
"
\n
"
.
join
(
venvs_in_cache_dirs
)
.
strip
()
.
replace
(
"py3.7"
,
"py3.7 (Activated)"
)
"
\n
"
.
join
(
venvs_in_cache_dirs
)
.
strip
()
.
replace
(
"py3.7"
,
"py3.7 (Activated)"
)
)
)
assert
expected
==
tester
.
io
.
fetch_output
()
.
strip
()
assert
tester
.
io
.
fetch_output
()
.
strip
()
==
expected
def
test_in_project_venv
(
tester
:
"CommandTester"
,
venvs_in_project_dir
:
List
[
str
]):
def
test_in_project_venv
(
tester
:
"CommandTester"
,
venvs_in_project_dir
:
List
[
str
]):
tester
.
execute
()
tester
.
execute
()
expected
=
".venv (Activated)
\n
"
expected
=
".venv (Activated)
\n
"
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
tests/console/commands/env/test_remove.py
View file @
b99b455d
...
@@ -40,7 +40,7 @@ def test_remove_by_python_version(
...
@@ -40,7 +40,7 @@ def test_remove_by_python_version(
assert
not
(
venv_cache
/
f
"{venv_name}-py3.6"
)
.
exists
()
assert
not
(
venv_cache
/
f
"{venv_name}-py3.6"
)
.
exists
()
expected
=
f
"Deleted virtualenv: {venv_cache / venv_name}-py3.6
\n
"
expected
=
f
"Deleted virtualenv: {venv_cache / venv_name}-py3.6
\n
"
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_remove_by_name
(
def
test_remove_by_name
(
...
@@ -58,7 +58,7 @@ def test_remove_by_name(
...
@@ -58,7 +58,7 @@ def test_remove_by_name(
expected
+=
f
"Deleted virtualenv: {venv_cache / name}
\n
"
expected
+=
f
"Deleted virtualenv: {venv_cache / name}
\n
"
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_remove_all
(
def
test_remove_all
(
...
@@ -72,7 +72,7 @@ def test_remove_all(
...
@@ -72,7 +72,7 @@ def test_remove_all(
for
name
in
venvs_in_cache_dirs
:
for
name
in
venvs_in_cache_dirs
:
assert
not
(
venv_cache
/
name
)
.
exists
()
assert
not
(
venv_cache
/
name
)
.
exists
()
expected
.
add
(
f
"Deleted virtualenv: {venv_cache / name}"
)
expected
.
add
(
f
"Deleted virtualenv: {venv_cache / name}"
)
assert
expected
==
set
(
tester
.
io
.
fetch_output
()
.
split
(
"
\n
"
))
assert
set
(
tester
.
io
.
fetch_output
()
.
split
(
"
\n
"
))
==
expected
def
test_remove_all_and_version
(
def
test_remove_all_and_version
(
...
@@ -86,7 +86,7 @@ def test_remove_all_and_version(
...
@@ -86,7 +86,7 @@ def test_remove_all_and_version(
for
name
in
venvs_in_cache_dirs
:
for
name
in
venvs_in_cache_dirs
:
assert
not
(
venv_cache
/
name
)
.
exists
()
assert
not
(
venv_cache
/
name
)
.
exists
()
expected
.
add
(
f
"Deleted virtualenv: {venv_cache / name}"
)
expected
.
add
(
f
"Deleted virtualenv: {venv_cache / name}"
)
assert
expected
==
set
(
tester
.
io
.
fetch_output
()
.
split
(
"
\n
"
))
assert
set
(
tester
.
io
.
fetch_output
()
.
split
(
"
\n
"
))
==
expected
def
test_remove_multiple
(
def
test_remove_multiple
(
...
@@ -104,4 +104,4 @@ def test_remove_multiple(
...
@@ -104,4 +104,4 @@ def test_remove_multiple(
expected
.
add
(
f
"Deleted virtualenv: {venv_cache / name}"
)
expected
.
add
(
f
"Deleted virtualenv: {venv_cache / name}"
)
for
name
in
remaining_envs
:
for
name
in
remaining_envs
:
assert
(
venv_cache
/
name
)
.
exists
()
assert
(
venv_cache
/
name
)
.
exists
()
assert
expected
==
set
(
tester
.
io
.
fetch_output
()
.
split
(
"
\n
"
))
assert
set
(
tester
.
io
.
fetch_output
()
.
split
(
"
\n
"
))
==
expected
tests/console/commands/env/test_use.py
View file @
b99b455d
...
@@ -87,7 +87,7 @@ Creating virtualenv {venv_py37.name} in {venv_py37.parent}
...
@@ -87,7 +87,7 @@ Creating virtualenv {venv_py37.name} in {venv_py37.parent}
Using virtualenv: {venv_py37}
Using virtualenv: {venv_py37}
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_get_prefers_explicitly_activated_virtualenvs_over_env_var
(
def
test_get_prefers_explicitly_activated_virtualenvs_over_env_var
(
...
@@ -115,7 +115,7 @@ def test_get_prefers_explicitly_activated_virtualenvs_over_env_var(
...
@@ -115,7 +115,7 @@ def test_get_prefers_explicitly_activated_virtualenvs_over_env_var(
Using virtualenv: {venv_dir}
Using virtualenv: {venv_dir}
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_get_prefers_explicitly_activated_non_existing_virtualenvs_over_env_var
(
def
test_get_prefers_explicitly_activated_non_existing_virtualenvs_over_env_var
(
...
@@ -150,4 +150,4 @@ Creating virtualenv {venv_dir.name} in {venv_dir.parent}
...
@@ -150,4 +150,4 @@ Creating virtualenv {venv_dir.name} in {venv_dir.parent}
Using virtualenv: {venv_dir}
Using virtualenv: {venv_dir}
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
tests/console/commands/test_about.py
View file @
b99b455d
...
@@ -24,4 +24,4 @@ Poetry is a dependency manager tracking local dependencies of your projects and\
...
@@ -24,4 +24,4 @@ Poetry is a dependency manager tracking local dependencies of your projects and\
See https://github.com/python-poetry/poetry for more information.
See https://github.com/python-poetry/poetry for more information.
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
tests/console/commands/test_add.py
View file @
b99b455d
This diff is collapsed.
Click to expand it.
tests/console/commands/test_cache.py
View file @
b99b455d
...
@@ -58,7 +58,7 @@ def test_cache_list(
...
@@ -58,7 +58,7 @@ def test_cache_list(
{repository_two}
{repository_two}
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_cache_list_empty
(
tester
:
"CommandTester"
,
repository_cache_dir
:
"Path"
):
def
test_cache_list_empty
(
tester
:
"CommandTester"
,
repository_cache_dir
:
"Path"
):
...
@@ -68,4 +68,4 @@ def test_cache_list_empty(tester: "CommandTester", repository_cache_dir: "Path")
...
@@ -68,4 +68,4 @@ def test_cache_list_empty(tester: "CommandTester", repository_cache_dir: "Path")
No caches found
No caches found
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
tests/console/commands/test_check.py
View file @
b99b455d
...
@@ -23,7 +23,7 @@ def test_check_valid(tester: "CommandTester"):
...
@@ -23,7 +23,7 @@ def test_check_valid(tester: "CommandTester"):
All set!
All set!
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_check_invalid
(
mocker
:
"MockerFixture"
,
tester
:
"CommandTester"
):
def
test_check_invalid
(
mocker
:
"MockerFixture"
,
tester
:
"CommandTester"
):
...
@@ -45,4 +45,4 @@ Warning: The "pendulum" dependency specifies the "allows-prereleases" property,\
...
@@ -45,4 +45,4 @@ Warning: The "pendulum" dependency specifies the "allows-prereleases" property,\
which is deprecated. Use "allow-prereleases" instead.
which is deprecated. Use "allow-prereleases" instead.
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
tests/console/commands/test_config.py
View file @
b99b455d
...
@@ -59,7 +59,7 @@ virtualenvs.path = {venv_path} # {config_cache_dir / 'virtualenvs'}
...
@@ -59,7 +59,7 @@ virtualenvs.path = {venv_path} # {config_cache_dir / 'virtualenvs'}
virtualenvs.prefer-active-python = false
virtualenvs.prefer-active-python = false
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_list_displays_set_get_setting
(
def
test_list_displays_set_get_setting
(
...
@@ -84,7 +84,7 @@ virtualenvs.prefer-active-python = false
...
@@ -84,7 +84,7 @@ virtualenvs.prefer-active-python = false
"""
"""
assert
config
.
set_config_source
.
call_count
==
0
assert
config
.
set_config_source
.
call_count
==
0
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_display_single_setting
(
tester
:
"CommandTester"
,
config
:
"Config"
):
def
test_display_single_setting
(
tester
:
"CommandTester"
,
config
:
"Config"
):
...
@@ -93,7 +93,7 @@ def test_display_single_setting(tester: "CommandTester", config: "Config"):
...
@@ -93,7 +93,7 @@ def test_display_single_setting(tester: "CommandTester", config: "Config"):
expected
=
"""true
expected
=
"""true
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_display_single_local_setting
(
def
test_display_single_local_setting
(
...
@@ -107,7 +107,7 @@ def test_display_single_local_setting(
...
@@ -107,7 +107,7 @@ def test_display_single_local_setting(
expected
=
"""false
expected
=
"""false
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_list_displays_set_get_local_setting
(
def
test_list_displays_set_get_local_setting
(
...
@@ -132,7 +132,7 @@ virtualenvs.prefer-active-python = false
...
@@ -132,7 +132,7 @@ virtualenvs.prefer-active-python = false
"""
"""
assert
config
.
set_config_source
.
call_count
==
1
assert
config
.
set_config_source
.
call_count
==
1
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_set_pypi_token
(
def
test_set_pypi_token
(
...
...
tests/console/commands/test_export.py
View file @
b99b455d
...
@@ -85,7 +85,7 @@ def _export_requirements(tester: "CommandTester", poetry: "Poetry") -> None:
...
@@ -85,7 +85,7 @@ def _export_requirements(tester: "CommandTester", poetry: "Poetry") -> None:
foo==1.0.0
foo==1.0.0
"""
"""
assert
expected
==
content
assert
content
==
expected
def
test_export_exports_requirements_txt_file_locks_if_no_lock_file
(
def
test_export_exports_requirements_txt_file_locks_if_no_lock_file
(
...
@@ -113,7 +113,7 @@ def test_export_prints_to_stdout_by_default(tester: "CommandTester", do_lock: No
...
@@ -113,7 +113,7 @@ def test_export_prints_to_stdout_by_default(tester: "CommandTester", do_lock: No
expected
=
"""
\
expected
=
"""
\
foo==1.0.0
foo==1.0.0
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_export_uses_requirements_txt_format_by_default
(
def
test_export_uses_requirements_txt_format_by_default
(
...
@@ -123,7 +123,7 @@ def test_export_uses_requirements_txt_format_by_default(
...
@@ -123,7 +123,7 @@ def test_export_uses_requirements_txt_format_by_default(
expected
=
"""
\
expected
=
"""
\
foo==1.0.0
foo==1.0.0
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_export_includes_extras_by_flag
(
tester
:
"CommandTester"
,
do_lock
:
None
):
def
test_export_includes_extras_by_flag
(
tester
:
"CommandTester"
,
do_lock
:
None
):
...
@@ -132,7 +132,7 @@ def test_export_includes_extras_by_flag(tester: "CommandTester", do_lock: None):
...
@@ -132,7 +132,7 @@ def test_export_includes_extras_by_flag(tester: "CommandTester", do_lock: None):
bar==1.1.0
bar==1.1.0
foo==1.0.0
foo==1.0.0
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_export_with_urls
(
def
test_export_with_urls
(
...
...
tests/console/commands/test_search.py
View file @
b99b455d
...
@@ -95,4 +95,4 @@ sqlalchemy-sqlany (1.0.3)
...
@@ -95,4 +95,4 @@ sqlalchemy-sqlany (1.0.3)
SAP Sybase SQL Anywhere dialect for SQLAlchemy
SAP Sybase SQL Anywhere dialect for SQLAlchemy
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
tests/console/commands/test_show.py
View file @
b99b455d
...
@@ -96,7 +96,7 @@ pendulum 2.0.0 Pendulum package
...
@@ -96,7 +96,7 @@ pendulum 2.0.0 Pendulum package
pytest 3.7.3 Pytest package
pytest 3.7.3 Pytest package
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_show_basic_with_installed_packages_single
(
def
test_show_basic_with_installed_packages_single
(
...
@@ -194,7 +194,7 @@ cachy 0.1.0 Cachy package
...
@@ -194,7 +194,7 @@ cachy 0.1.0 Cachy package
pendulum (!) 2.0.0 Pendulum package
pendulum (!) 2.0.0 Pendulum package
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_show_basic_with_not_installed_packages_decorated
(
def
test_show_basic_with_not_installed_packages_decorated
(
...
@@ -250,7 +250,7 @@ def test_show_basic_with_not_installed_packages_decorated(
...
@@ -250,7 +250,7 @@ def test_show_basic_with_not_installed_packages_decorated(
\033
[31mpendulum
\033
[39m
\033
[39;1m2.0.0
\033
[39;22m Pendulum package
\033
[31mpendulum
\033
[39m
\033
[39;1m2.0.0
\033
[39;22m Pendulum package
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_show_latest_non_decorated
(
def
test_show_latest_non_decorated
(
...
@@ -320,7 +320,7 @@ cachy 0.1.0 0.2.0 Cachy package
...
@@ -320,7 +320,7 @@ cachy 0.1.0 0.2.0 Cachy package
pendulum 2.0.0 2.0.1 Pendulum package
pendulum 2.0.0 2.0.1 Pendulum package
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_show_latest_decorated
(
def
test_show_latest_decorated
(
...
@@ -392,7 +392,7 @@ def test_show_latest_decorated(
...
@@ -392,7 +392,7 @@ def test_show_latest_decorated(
\033
[31m2.0.1
\033
[39m Pendulum package
\033
[31m2.0.1
\033
[39m Pendulum package
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_show_outdated
(
def
test_show_outdated
(
...
@@ -458,7 +458,7 @@ def test_show_outdated(
...
@@ -458,7 +458,7 @@ def test_show_outdated(
cachy 0.1.0 0.2.0 Cachy package
cachy 0.1.0 0.2.0 Cachy package
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_show_outdated_with_only_up_to_date_packages
(
def
test_show_outdated_with_only_up_to_date_packages
(
...
@@ -500,7 +500,7 @@ def test_show_outdated_with_only_up_to_date_packages(
...
@@ -500,7 +500,7 @@ def test_show_outdated_with_only_up_to_date_packages(
expected
=
""
expected
=
""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_show_outdated_has_prerelease_but_not_allowed
(
def
test_show_outdated_has_prerelease_but_not_allowed
(
...
@@ -571,7 +571,7 @@ def test_show_outdated_has_prerelease_but_not_allowed(
...
@@ -571,7 +571,7 @@ def test_show_outdated_has_prerelease_but_not_allowed(
cachy 0.1.0 0.2.0 Cachy package
cachy 0.1.0 0.2.0 Cachy package
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_show_outdated_has_prerelease_and_allowed
(
def
test_show_outdated_has_prerelease_and_allowed
(
...
@@ -646,7 +646,7 @@ def test_show_outdated_has_prerelease_and_allowed(
...
@@ -646,7 +646,7 @@ def test_show_outdated_has_prerelease_and_allowed(
cachy 0.1.0.dev1 0.3.0.dev123 Cachy package
cachy 0.1.0.dev1 0.3.0.dev123 Cachy package
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_show_outdated_formatting
(
def
test_show_outdated_formatting
(
...
@@ -716,7 +716,7 @@ cachy 0.1.0 0.2.0 Cachy package
...
@@ -716,7 +716,7 @@ cachy 0.1.0 0.2.0 Cachy package
pendulum 2.0.0 2.0.1 Pendulum package
pendulum 2.0.0 2.0.1 Pendulum package
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
@pytest.mark.parametrize
(
"project_directory"
,
[
"project_with_local_dependencies"
])
@pytest.mark.parametrize
(
"project_directory"
,
[
"project_with_local_dependencies"
])
...
@@ -829,8 +829,9 @@ def test_show_outdated_local_dependencies(
...
@@ -829,8 +829,9 @@ def test_show_outdated_local_dependencies(
cachy 0.2.0 0.3.0
cachy 0.2.0 0.3.0
project-with-setup 0.1.1 ../project_with_setup 0.1.2 ../project_with_setup
project-with-setup 0.1.1 ../project_with_setup 0.1.2 ../project_with_setup
"""
"""
assert
expected
.
rstrip
()
==
"
\n
"
.
join
(
assert
(
line
.
rstrip
()
for
line
in
tester
.
io
.
fetch_output
()
.
splitlines
()
"
\n
"
.
join
(
line
.
rstrip
()
for
line
in
tester
.
io
.
fetch_output
()
.
splitlines
())
==
expected
.
rstrip
()
)
)
...
@@ -933,7 +934,7 @@ cachy 0.1.0 0.2.0 Cachy package
...
@@ -933,7 +934,7 @@ cachy 0.1.0 0.2.0 Cachy package
demo 0.1.1 9cf87a2 0.1.2 9cf87a2 Demo package
demo 0.1.1 9cf87a2 0.1.2 9cf87a2 Demo package
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
@pytest.mark.parametrize
(
"project_directory"
,
[
"project_with_git_dev_dependency"
])
@pytest.mark.parametrize
(
"project_directory"
,
[
"project_with_git_dev_dependency"
])
...
@@ -1031,7 +1032,7 @@ def test_show_outdated_no_dev_git_dev_dependency(
...
@@ -1031,7 +1032,7 @@ def test_show_outdated_no_dev_git_dev_dependency(
cachy 0.1.0 0.2.0 Cachy package
cachy 0.1.0 0.2.0 Cachy package
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_show_hides_incompatible_package
(
def
test_show_hides_incompatible_package
(
...
@@ -1092,7 +1093,7 @@ def test_show_hides_incompatible_package(
...
@@ -1092,7 +1093,7 @@ def test_show_hides_incompatible_package(
pendulum 2.0.0 Pendulum package
pendulum 2.0.0 Pendulum package
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_show_all_shows_incompatible_package
(
def
test_show_all_shows_incompatible_package
(
...
@@ -1150,7 +1151,7 @@ cachy 0.1.0 Cachy package
...
@@ -1150,7 +1151,7 @@ cachy 0.1.0 Cachy package
pendulum 2.0.0 Pendulum package
pendulum 2.0.0 Pendulum package
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_show_non_dev_with_basic_installed_packages
(
def
test_show_non_dev_with_basic_installed_packages
(
...
@@ -1226,7 +1227,7 @@ cachy 0.1.0 Cachy package
...
@@ -1226,7 +1227,7 @@ cachy 0.1.0 Cachy package
pendulum 2.0.0 Pendulum package
pendulum 2.0.0 Pendulum package
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_show_with_group_only
(
def
test_show_with_group_only
(
...
@@ -1301,7 +1302,7 @@ def test_show_with_group_only(
...
@@ -1301,7 +1302,7 @@ def test_show_with_group_only(
pytest 3.7.3 Pytest package
pytest 3.7.3 Pytest package
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_show_with_optional_group
(
def
test_show_with_optional_group
(
...
@@ -1377,7 +1378,7 @@ cachy 0.1.0 Cachy package
...
@@ -1377,7 +1378,7 @@ cachy 0.1.0 Cachy package
pendulum 2.0.0 Pendulum package
pendulum 2.0.0 Pendulum package
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
tester
.
execute
(
"--with dev"
)
tester
.
execute
(
"--with dev"
)
...
@@ -1387,7 +1388,7 @@ pendulum 2.0.0 Pendulum package
...
@@ -1387,7 +1388,7 @@ pendulum 2.0.0 Pendulum package
pytest 3.7.3 Pytest package
pytest 3.7.3 Pytest package
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_show_tree
(
tester
:
"CommandTester"
,
poetry
:
"Poetry"
,
installed
:
"Repository"
):
def
test_show_tree
(
tester
:
"CommandTester"
,
poetry
:
"Poetry"
,
installed
:
"Repository"
):
...
@@ -1439,7 +1440,7 @@ cachy 0.2.0
...
@@ -1439,7 +1440,7 @@ cachy 0.2.0
`-- msgpack-python >=0.5 <0.6
`-- msgpack-python >=0.5 <0.6
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_show_tree_no_dev
(
def
test_show_tree_no_dev
(
...
@@ -1508,7 +1509,7 @@ cachy 0.2.0
...
@@ -1508,7 +1509,7 @@ cachy 0.2.0
└── msgpack-python >=0.5 <0.6
└── msgpack-python >=0.5 <0.6
"""
"""
assert
expected
==
tester
.
io
.
fetch_output
()
assert
tester
.
io
.
fetch_output
()
==
expected
def
test_show_required_by_deps
(
def
test_show_required_by_deps
(
...
...
tests/console/commands/test_version.py
View file @
b99b455d
...
@@ -50,7 +50,7 @@ def tester(command_tester_factory: "CommandTesterFactory") -> "CommandTester":
...
@@ -50,7 +50,7 @@ def tester(command_tester_factory: "CommandTesterFactory") -> "CommandTester":
def
test_increment_version
(
def
test_increment_version
(
version
:
str
,
rule
:
str
,
expected
:
str
,
command
:
VersionCommand
version
:
str
,
rule
:
str
,
expected
:
str
,
command
:
VersionCommand
):
):
assert
expected
==
command
.
increment_version
(
version
,
rule
)
.
text
assert
command
.
increment_version
(
version
,
rule
)
.
text
==
expected
def
test_version_show
(
tester
:
"CommandTester"
):
def
test_version_show
(
tester
:
"CommandTester"
):
...
...
tests/installation/test_chef.py
View file @
b99b455d
...
@@ -87,4 +87,4 @@ def test_get_cache_directory_for_link(config: "Config", config_cache_dir: Path):
...
@@ -87,4 +87,4 @@ def test_get_cache_directory_for_link(config: "Config", config_cache_dir: Path):
"283a3b3b7f95f05e9e6f84182d276f7bb0951d5b0cc24422b33f7a4648"
"283a3b3b7f95f05e9e6f84182d276f7bb0951d5b0cc24422b33f7a4648"
)
)
assert
expected
==
directory
assert
directory
==
expected
tests/installation/test_executor.py
View file @
b99b455d
...
@@ -173,7 +173,7 @@ Package operations: 4 installs, 1 update, 1 removal
...
@@ -173,7 +173,7 @@ Package operations: 4 installs, 1 update, 1 removal
expected
=
set
(
expected
.
splitlines
())
expected
=
set
(
expected
.
splitlines
())
output
=
set
(
io
.
fetch_output
()
.
splitlines
())
output
=
set
(
io
.
fetch_output
()
.
splitlines
())
assert
expected
==
output
assert
output
==
expected
assert
len
(
env
.
executed
)
==
5
assert
len
(
env
.
executed
)
==
5
assert
return_code
==
0
assert
return_code
==
0
pip_editable_install
.
assert_called_once
()
pip_editable_install
.
assert_called_once
()
...
@@ -199,7 +199,7 @@ Package operations: 0 installs, 0 updates, 0 removals, 1 skipped
...
@@ -199,7 +199,7 @@ Package operations: 0 installs, 0 updates, 0 removals, 1 skipped
• Removing clikit (0.2.3): Skipped for the following reason: Not currently installed
• Removing clikit (0.2.3): Skipped for the following reason: Not currently installed
"""
"""
assert
expected
==
io
.
fetch_output
()
assert
io
.
fetch_output
()
==
expected
assert
len
(
env
.
executed
)
==
0
assert
len
(
env
.
executed
)
==
0
...
@@ -299,7 +299,7 @@ Package operations: 1 install, 0 updates, 0 removals
...
@@ -299,7 +299,7 @@ Package operations: 1 install, 0 updates, 0 removals
"""
"""
expected
=
set
(
expected
.
splitlines
())
expected
=
set
(
expected
.
splitlines
())
output
=
set
(
io_not_decorated
.
fetch_output
()
.
splitlines
())
output
=
set
(
io_not_decorated
.
fetch_output
()
.
splitlines
())
assert
expected
==
output
assert
output
==
expected
assert
return_code
==
0
assert
return_code
==
0
...
@@ -321,7 +321,7 @@ Package operations: 1 install, 0 updates, 0 removals
...
@@ -321,7 +321,7 @@ Package operations: 1 install, 0 updates, 0 removals
• Installing clikit (0.2.3): Cancelled
• Installing clikit (0.2.3): Cancelled
"""
"""
assert
expected
==
io
.
fetch_output
()
assert
io
.
fetch_output
()
==
expected
def
test_execute_should_gracefully_handle_io_error
(
def
test_execute_should_gracefully_handle_io_error
(
...
...
tests/installation/test_installer.py
View file @
b99b455d
...
@@ -741,7 +741,7 @@ def test_run_install_with_synchronization(
...
@@ -741,7 +741,7 @@ def test_run_install_with_synchronization(
*
managed_reserved_package_names
,
*
managed_reserved_package_names
,
}
}
assert
expected_removals
==
{
r
.
name
for
r
in
installer
.
executor
.
removals
}
assert
{
r
.
name
for
r
in
installer
.
executor
.
removals
}
==
expected_removals
def
test_run_whitelist_add
(
def
test_run_whitelist_add
(
...
@@ -2153,21 +2153,21 @@ def test_update_multiple_times_with_split_dependencies_is_idempotent(
...
@@ -2153,21 +2153,21 @@ def test_update_multiple_times_with_split_dependencies_is_idempotent(
installer
.
update
(
True
)
installer
.
update
(
True
)
installer
.
run
()
installer
.
run
()
assert
expected
==
locker
.
written_data
assert
locker
.
written_data
==
expected
locker
.
mock_lock_data
(
locker
.
written_data
)
locker
.
mock_lock_data
(
locker
.
written_data
)
installer
.
update
(
True
)
installer
.
update
(
True
)
installer
.
run
()
installer
.
run
()
assert
expected
==
locker
.
written_data
assert
locker
.
written_data
==
expected
locker
.
mock_lock_data
(
locker
.
written_data
)
locker
.
mock_lock_data
(
locker
.
written_data
)
installer
.
update
(
True
)
installer
.
update
(
True
)
installer
.
run
()
installer
.
run
()
assert
expected
==
locker
.
written_data
assert
locker
.
written_data
==
expected
def
test_installer_can_install_dependencies_from_forced_source
(
def
test_installer_can_install_dependencies_from_forced_source
(
...
...
tests/installation/test_installer_old.py
View file @
b99b455d
...
@@ -1774,21 +1774,21 @@ def test_update_multiple_times_with_split_dependencies_is_idempotent(
...
@@ -1774,21 +1774,21 @@ def test_update_multiple_times_with_split_dependencies_is_idempotent(
installer
.
update
(
True
)
installer
.
update
(
True
)
installer
.
run
()
installer
.
run
()
assert
expected
==
locker
.
written_data
assert
locker
.
written_data
==
expected
locker
.
mock_lock_data
(
locker
.
written_data
)
locker
.
mock_lock_data
(
locker
.
written_data
)
installer
.
update
(
True
)
installer
.
update
(
True
)
installer
.
run
()
installer
.
run
()
assert
expected
==
locker
.
written_data
assert
locker
.
written_data
==
expected
locker
.
mock_lock_data
(
locker
.
written_data
)
locker
.
mock_lock_data
(
locker
.
written_data
)
installer
.
update
(
True
)
installer
.
update
(
True
)
installer
.
run
()
installer
.
run
()
assert
expected
==
locker
.
written_data
assert
locker
.
written_data
==
expected
def
test_installer_can_install_dependencies_from_forced_source
(
def
test_installer_can_install_dependencies_from_forced_source
(
...
...
tests/installation/test_pip_installer.py
View file @
b99b455d
...
@@ -62,7 +62,7 @@ def test_requirement(installer: PipInstaller):
...
@@ -62,7 +62,7 @@ def test_requirement(installer: PipInstaller):
"
\n
"
"
\n
"
)
)
assert
expected
==
result
assert
result
==
expected
def
test_requirement_source_type_url
():
def
test_requirement_source_type_url
():
...
@@ -78,7 +78,7 @@ def test_requirement_source_type_url():
...
@@ -78,7 +78,7 @@ def test_requirement_source_type_url():
result
=
installer
.
requirement
(
foo
,
formatted
=
True
)
result
=
installer
.
requirement
(
foo
,
formatted
=
True
)
expected
=
f
"{foo.source_url}#egg={foo.name}"
expected
=
f
"{foo.source_url}#egg={foo.name}"
assert
expected
==
result
assert
result
==
expected
def
test_requirement_git_develop_false
(
installer
:
PipInstaller
,
package_git
:
Package
):
def
test_requirement_git_develop_false
(
installer
:
PipInstaller
,
package_git
:
Package
):
...
@@ -86,7 +86,7 @@ def test_requirement_git_develop_false(installer: PipInstaller, package_git: Pac
...
@@ -86,7 +86,7 @@ def test_requirement_git_develop_false(installer: PipInstaller, package_git: Pac
result
=
installer
.
requirement
(
package_git
)
result
=
installer
.
requirement
(
package_git
)
expected
=
"git+git@github.com:demo/demo.git@master#egg=demo"
expected
=
"git+git@github.com:demo/demo.git@master#egg=demo"
assert
expected
==
result
assert
result
==
expected
def
test_install_with_non_pypi_default_repository
(
pool
:
Pool
,
installer
:
PipInstaller
):
def
test_install_with_non_pypi_default_repository
(
pool
:
Pool
,
installer
:
PipInstaller
):
...
@@ -182,7 +182,7 @@ def test_requirement_git_develop_true(installer: PipInstaller, package_git: Pack
...
@@ -182,7 +182,7 @@ def test_requirement_git_develop_true(installer: PipInstaller, package_git: Pack
result
=
installer
.
requirement
(
package_git
)
result
=
installer
.
requirement
(
package_git
)
expected
=
[
"-e"
,
"git+git@github.com:demo/demo.git@master#egg=demo"
]
expected
=
[
"-e"
,
"git+git@github.com:demo/demo.git@master#egg=demo"
]
assert
expected
==
result
assert
result
==
expected
def
test_uninstall_git_package_nspkg_pth_cleanup
(
def
test_uninstall_git_package_nspkg_pth_cleanup
(
...
...
tests/packages/test_locker.py
View file @
b99b455d
...
@@ -103,7 +103,7 @@ B = []
...
@@ -103,7 +103,7 @@ B = []
git-package = []
git-package = []
"""
"""
assert
expected
==
content
assert
content
==
expected
def
test_locker_properly_loads_extras
(
locker
:
Locker
):
def
test_locker_properly_loads_extras
(
locker
:
Locker
):
...
@@ -307,7 +307,7 @@ content-hash = "178f2cd01dc40e96be23a4a0ae1094816626346346618335e5ff4f0b2c0c5831
...
@@ -307,7 +307,7 @@ content-hash = "178f2cd01dc40e96be23a4a0ae1094816626346346618335e5ff4f0b2c0c5831
A = []
A = []
"""
"""
assert
expected
==
content
assert
content
==
expected
def
test_lock_file_should_not_have_mixed_types
(
locker
:
Locker
,
root
:
ProjectPackage
):
def
test_lock_file_should_not_have_mixed_types
(
locker
:
Locker
,
root
:
ProjectPackage
):
...
@@ -350,7 +350,7 @@ A = []
...
@@ -350,7 +350,7 @@ A = []
with
locker
.
lock
.
open
(
encoding
=
"utf-8"
)
as
f
:
with
locker
.
lock
.
open
(
encoding
=
"utf-8"
)
as
f
:
content
=
f
.
read
()
content
=
f
.
read
()
assert
expected
==
content
assert
content
==
expected
def
test_reading_lock_file_should_raise_an_error_on_invalid_data
(
locker
:
Locker
):
def
test_reading_lock_file_should_raise_an_error_on_invalid_data
(
locker
:
Locker
):
...
@@ -424,7 +424,7 @@ content-hash = "178f2cd01dc40e96be23a4a0ae1094816626346346618335e5ff4f0b2c0c5831
...
@@ -424,7 +424,7 @@ content-hash = "178f2cd01dc40e96be23a4a0ae1094816626346346618335e5ff4f0b2c0c5831
A = []
A = []
"""
"""
assert
expected
==
content
assert
content
==
expected
def
test_locker_should_emit_warnings_if_lock_version_is_newer_but_allowed
(
def
test_locker_should_emit_warnings_if_lock_version_is_newer_but_allowed
(
...
@@ -455,7 +455,7 @@ The lock file might not be compatible with the current version of Poetry.
...
@@ -455,7 +455,7 @@ The lock file might not be compatible with the current version of Poetry.
Upgrade Poetry to ensure the lock file is read properly or, alternatively,
\
Upgrade Poetry to ensure the lock file is read properly or, alternatively,
\
regenerate the lock file with the `poetry lock` command.
\
regenerate the lock file with the `poetry lock` command.
\
"""
"""
assert
expected
==
record
.
message
assert
record
.
message
==
expected
def
test_locker_should_raise_an_error_if_lock_version_is_newer_and_not_allowed
(
def
test_locker_should_raise_an_error_if_lock_version_is_newer_and_not_allowed
(
...
@@ -511,7 +511,7 @@ A = []
...
@@ -511,7 +511,7 @@ A = []
with
locker
.
lock
.
open
(
encoding
=
"utf-8"
)
as
f
:
with
locker
.
lock
.
open
(
encoding
=
"utf-8"
)
as
f
:
content
=
f
.
read
()
content
=
f
.
read
()
assert
expected
==
content
assert
content
==
expected
def
test_locker_should_neither_emit_warnings_nor_raise_error_for_lower_compatible_versions
(
# noqa: E501
def
test_locker_should_neither_emit_warnings_nor_raise_error_for_lower_compatible_versions
(
# noqa: E501
...
@@ -602,7 +602,7 @@ content-hash = "178f2cd01dc40e96be23a4a0ae1094816626346346618335e5ff4f0b2c0c5831
...
@@ -602,7 +602,7 @@ content-hash = "178f2cd01dc40e96be23a4a0ae1094816626346346618335e5ff4f0b2c0c5831
A = []
A = []
"""
"""
assert
expected
==
content
assert
content
==
expected
def
test_locked_repository_uses_root_dir_of_package
(
def
test_locked_repository_uses_root_dir_of_package
(
...
...
tests/puzzle/test_solver.py
View file @
b99b455d
...
@@ -120,7 +120,7 @@ def check_solver_result(
...
@@ -120,7 +120,7 @@ def check_solver_result(
result
.
append
({
"job"
:
job
,
"package"
:
op
.
package
,
"skipped"
:
op
.
skipped
})
result
.
append
({
"job"
:
job
,
"package"
:
op
.
package
,
"skipped"
:
op
.
skipped
})
assert
expected
==
result
assert
result
==
expected
return
ops
return
ops
...
...
tests/puzzle/test_transaction.py
View file @
b99b455d
...
@@ -37,7 +37,7 @@ def check_operations(
...
@@ -37,7 +37,7 @@ def check_operations(
result
.
append
({
"job"
:
job
,
"package"
:
op
.
package
,
"skipped"
:
op
.
skipped
})
result
.
append
({
"job"
:
job
,
"package"
:
op
.
package
,
"skipped"
:
op
.
skipped
})
assert
expected
==
result
assert
result
==
expected
def
test_it_should_calculate_operations_in_correct_order
():
def
test_it_should_calculate_operations_in_correct_order
():
...
...
tests/repositories/test_legacy_repository.py
View file @
b99b455d
...
@@ -235,7 +235,7 @@ def test_get_package_from_both_py2_and_py3_specific_wheels():
...
@@ -235,7 +235,7 @@ def test_get_package_from_both_py2_and_py3_specific_wheels():
Dependency
(
"win-unicode-console"
,
">=0.5"
),
Dependency
(
"win-unicode-console"
,
">=0.5"
),
]
]
required
=
[
r
for
r
in
package
.
requires
if
not
r
.
is_optional
()]
required
=
[
r
for
r
in
package
.
requires
if
not
r
.
is_optional
()]
assert
expected
==
requir
ed
assert
required
==
expect
ed
assert
str
(
required
[
1
]
.
marker
)
==
'python_version == "2.7"'
assert
str
(
required
[
1
]
.
marker
)
==
'python_version == "2.7"'
assert
(
assert
(
...
@@ -272,7 +272,7 @@ def test_get_package_with_dist_and_universal_py3_wheel():
...
@@ -272,7 +272,7 @@ def test_get_package_with_dist_and_universal_py3_wheel():
Dependency
(
"win-unicode-console"
,
">=0.5"
),
Dependency
(
"win-unicode-console"
,
">=0.5"
),
]
]
required
=
[
r
for
r
in
package
.
requires
if
not
r
.
is_optional
()]
required
=
[
r
for
r
in
package
.
requires
if
not
r
.
is_optional
()]
assert
expected
==
sorted
(
required
,
key
=
lambda
dep
:
dep
.
name
)
assert
sorted
(
required
,
key
=
lambda
dep
:
dep
.
name
)
==
expected
def
test_get_package_retrieves_non_sha256_hashes
():
def
test_get_package_retrieves_non_sha256_hashes
():
...
@@ -291,7 +291,7 @@ def test_get_package_retrieves_non_sha256_hashes():
...
@@ -291,7 +291,7 @@ def test_get_package_retrieves_non_sha256_hashes():
},
},
]
]
assert
expected
==
package
.
files
assert
package
.
files
==
expected
def
test_get_package_retrieves_non_sha256_hashes_mismatching_known_hash
():
def
test_get_package_retrieves_non_sha256_hashes_mismatching_known_hash
():
...
@@ -314,7 +314,7 @@ def test_get_package_retrieves_non_sha256_hashes_mismatching_known_hash():
...
@@ -314,7 +314,7 @@ def test_get_package_retrieves_non_sha256_hashes_mismatching_known_hash():
},
},
]
]
assert
expected
==
package
.
files
assert
package
.
files
==
expected
def
test_get_package_retrieves_packages_with_no_hashes
():
def
test_get_package_retrieves_packages_with_no_hashes
():
...
...
tests/repositories/test_pypi_repository.py
View file @
b99b455d
...
@@ -200,8 +200,8 @@ def test_pypi_repository_supports_reading_bz2_files():
...
@@ -200,8 +200,8 @@ def test_pypi_repository_supports_reading_bz2_files():
}
}
for
name
in
expected_extras
.
keys
():
for
name
in
expected_extras
.
keys
():
assert
expected_extras
[
name
]
==
sorted
(
assert
(
package
.
extras
[
name
],
key
=
lambda
r
:
r
.
name
sorted
(
package
.
extras
[
name
],
key
=
lambda
r
:
r
.
name
)
==
expected_extras
[
name
]
)
)
...
...
tests/test_factory.py
View file @
b99b455d
...
@@ -288,7 +288,7 @@ def test_create_poetry_fails_on_invalid_configuration():
...
@@ -288,7 +288,7 @@ def test_create_poetry_fails_on_invalid_configuration():
The Poetry configuration is invalid:
The Poetry configuration is invalid:
- 'description' is a required property
- 'description' is a required property
"""
"""
assert
expected
==
str
(
e
.
value
)
assert
str
(
e
.
value
)
==
expected
def
test_create_poetry_with_local_config
(
fixture_dir
:
"FixtureDirGetter"
):
def
test_create_poetry_with_local_config
(
fixture_dir
:
"FixtureDirGetter"
):
...
...
tests/utils/test_env.py
View file @
b99b455d
...
@@ -576,8 +576,8 @@ def test_list(tmp_dir: str, manager: EnvManager, poetry: "Poetry", config: "Conf
...
@@ -576,8 +576,8 @@ def test_list(tmp_dir: str, manager: EnvManager, poetry: "Poetry", config: "Conf
venvs
=
manager
.
list
()
venvs
=
manager
.
list
()
assert
len
(
venvs
)
==
2
assert
len
(
venvs
)
==
2
assert
(
Path
(
tmp_dir
)
/
f
"{venv_name}-py3.6"
)
==
venvs
[
0
]
.
path
assert
venvs
[
0
]
.
path
==
(
Path
(
tmp_dir
)
/
f
"{venv_name}-py3.6"
)
assert
(
Path
(
tmp_dir
)
/
f
"{venv_name}-py3.7"
)
==
venvs
[
1
]
.
path
assert
venvs
[
1
]
.
path
==
(
Path
(
tmp_dir
)
/
f
"{venv_name}-py3.7"
)
def
test_remove_by_python_version
(
def
test_remove_by_python_version
(
...
@@ -600,8 +600,9 @@ def test_remove_by_python_version(
...
@@ -600,8 +600,9 @@ def test_remove_by_python_version(
venv
=
manager
.
remove
(
"3.6"
)
venv
=
manager
.
remove
(
"3.6"
)
assert
(
Path
(
tmp_dir
)
/
f
"{venv_name}-py3.6"
)
==
venv
.
path
expected_venv_path
=
Path
(
tmp_dir
)
/
f
"{venv_name}-py3.6"
assert
not
(
Path
(
tmp_dir
)
/
f
"{venv_name}-py3.6"
)
.
exists
()
assert
venv
.
path
==
expected_venv_path
assert
not
expected_venv_path
.
exists
()
def
test_remove_by_name
(
def
test_remove_by_name
(
...
@@ -624,8 +625,9 @@ def test_remove_by_name(
...
@@ -624,8 +625,9 @@ def test_remove_by_name(
venv
=
manager
.
remove
(
f
"{venv_name}-py3.6"
)
venv
=
manager
.
remove
(
f
"{venv_name}-py3.6"
)
assert
(
Path
(
tmp_dir
)
/
f
"{venv_name}-py3.6"
)
==
venv
.
path
expected_venv_path
=
Path
(
tmp_dir
)
/
f
"{venv_name}-py3.6"
assert
not
(
Path
(
tmp_dir
)
/
f
"{venv_name}-py3.6"
)
.
exists
()
assert
venv
.
path
==
expected_venv_path
assert
not
expected_venv_path
.
exists
()
def
test_remove_also_deactivates
(
def
test_remove_also_deactivates
(
...
@@ -653,8 +655,9 @@ def test_remove_also_deactivates(
...
@@ -653,8 +655,9 @@ def test_remove_also_deactivates(
venv
=
manager
.
remove
(
"python3.6"
)
venv
=
manager
.
remove
(
"python3.6"
)
assert
(
Path
(
tmp_dir
)
/
f
"{venv_name}-py3.6"
)
==
venv
.
path
expected_venv_path
=
Path
(
tmp_dir
)
/
f
"{venv_name}-py3.6"
assert
not
(
Path
(
tmp_dir
)
/
f
"{venv_name}-py3.6"
)
.
exists
()
assert
venv
.
path
==
expected_venv_path
assert
not
expected_venv_path
.
exists
()
envs
=
envs_file
.
read
()
envs
=
envs_file
.
read
()
assert
venv_name
not
in
envs
assert
venv_name
not
in
envs
...
@@ -884,7 +887,7 @@ def test_create_venv_fails_if_no_compatible_python_version_could_be_found(
...
@@ -884,7 +887,7 @@ def test_create_venv_fails_if_no_compatible_python_version_could_be_found(
'via the "env use" command.'
'via the "env use" command.'
)
)
assert
expected_message
==
str
(
e
.
value
)
assert
str
(
e
.
value
)
==
expected_message
assert
m
.
call_count
==
0
assert
m
.
call_count
==
0
...
@@ -910,7 +913,7 @@ def test_create_venv_does_not_try_to_find_compatible_versions_with_executable(
...
@@ -910,7 +913,7 @@ def test_create_venv_does_not_try_to_find_compatible_versions_with_executable(
"specified in the pyproject.toml file."
"specified in the pyproject.toml file."
)
)
assert
expected_message
==
str
(
e
.
value
)
assert
str
(
e
.
value
)
==
expected_message
assert
m
.
call_count
==
0
assert
m
.
call_count
==
0
...
...
tests/utils/test_exporter.py
View file @
b99b455d
...
@@ -133,7 +133,7 @@ bar==4.5.6
...
@@ -133,7 +133,7 @@ bar==4.5.6
foo==1.2.3
foo==1.2.3
"""
"""
assert
expected
==
content
assert
content
==
expected
def
test_exporter_can_export_requirements_txt_with_standard_packages_and_markers
(
def
test_exporter_can_export_requirements_txt_with_standard_packages_and_markers
(
...
@@ -189,7 +189,7 @@ baz==7.8.9 ; sys_platform == "win32"
...
@@ -189,7 +189,7 @@ baz==7.8.9 ; sys_platform == "win32"
foo==1.2.3 ; python_version < "3.7"
foo==1.2.3 ; python_version < "3.7"
"""
"""
assert
expected
==
content
assert
content
==
expected
def
test_exporter_can_export_requirements_txt_poetry
(
tmp_dir
:
str
,
poetry
:
"Poetry"
):
def
test_exporter_can_export_requirements_txt_poetry
(
tmp_dir
:
str
,
poetry
:
"Poetry"
):
...
@@ -571,7 +571,7 @@ foo==1.2.3 \\
...
@@ -571,7 +571,7 @@ foo==1.2.3 \\
--hash=sha256:12345
--hash=sha256:12345
"""
"""
assert
expected
==
content
assert
content
==
expected
def
test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled
(
# noqa: E501
def
test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled
(
# noqa: E501
...
@@ -618,7 +618,7 @@ bar==4.5.6
...
@@ -618,7 +618,7 @@ bar==4.5.6
foo==1.2.3
foo==1.2.3
"""
"""
assert
expected
==
content
assert
content
==
expected
def
test_exporter_exports_requirements_txt_without_dev_packages_by_default
(
def
test_exporter_exports_requirements_txt_without_dev_packages_by_default
(
...
@@ -663,7 +663,7 @@ foo==1.2.3 \\
...
@@ -663,7 +663,7 @@ foo==1.2.3 \\
--hash=sha256:12345
--hash=sha256:12345
"""
"""
assert
expected
==
content
assert
content
==
expected
def
test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in
(
def
test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in
(
...
@@ -710,7 +710,7 @@ foo==1.2.3 \\
...
@@ -710,7 +710,7 @@ foo==1.2.3 \\
--hash=sha256:12345
--hash=sha256:12345
"""
"""
assert
expected
==
content
assert
content
==
expected
def
test_exporter_exports_requirements_txt_without_optional_packages
(
def
test_exporter_exports_requirements_txt_without_optional_packages
(
...
@@ -755,7 +755,7 @@ foo==1.2.3 \\
...
@@ -755,7 +755,7 @@ foo==1.2.3 \\
--hash=sha256:12345
--hash=sha256:12345
"""
"""
assert
expected
==
content
assert
content
==
expected
@pytest.mark.parametrize
(
@pytest.mark.parametrize
(
...
@@ -867,7 +867,7 @@ def test_exporter_can_export_requirements_txt_with_git_packages(
...
@@ -867,7 +867,7 @@ def test_exporter_can_export_requirements_txt_with_git_packages(
foo @ git+https://github.com/foo/foo.git@123456
foo @ git+https://github.com/foo/foo.git@123456
"""
"""
assert
expected
==
content
assert
content
==
expected
def
test_exporter_can_export_requirements_txt_with_nested_packages
(
def
test_exporter_can_export_requirements_txt_with_nested_packages
(
...
@@ -918,7 +918,7 @@ bar==4.5.6
...
@@ -918,7 +918,7 @@ bar==4.5.6
foo @ git+https://github.com/foo/foo.git@123456
foo @ git+https://github.com/foo/foo.git@123456
"""
"""
assert
expected
==
content
assert
content
==
expected
def
test_exporter_can_export_requirements_txt_with_nested_packages_cyclic
(
def
test_exporter_can_export_requirements_txt_with_nested_packages_cyclic
(
...
@@ -974,7 +974,7 @@ baz==7.8.9
...
@@ -974,7 +974,7 @@ baz==7.8.9
foo==1.2.3
foo==1.2.3
"""
"""
assert
expected
==
content
assert
content
==
expected
def
test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers
(
def
test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers
(
...
@@ -1103,7 +1103,7 @@ def test_exporter_can_export_requirements_txt_with_git_packages_and_markers(
...
@@ -1103,7 +1103,7 @@ def test_exporter_can_export_requirements_txt_with_git_packages_and_markers(
foo @ git+https://github.com/foo/foo.git@123456 ; python_version < "3.7"
foo @ git+https://github.com/foo/foo.git@123456 ; python_version < "3.7"
"""
"""
assert
expected
==
content
assert
content
==
expected
def
test_exporter_can_export_requirements_txt_with_directory_packages
(
def
test_exporter_can_export_requirements_txt_with_directory_packages
(
...
@@ -1145,7 +1145,7 @@ def test_exporter_can_export_requirements_txt_with_directory_packages(
...
@@ -1145,7 +1145,7 @@ def test_exporter_can_export_requirements_txt_with_directory_packages(
foo @ {working_directory.as_uri()}/tests/fixtures/sample_project
foo @ {working_directory.as_uri()}/tests/fixtures/sample_project
"""
"""
assert
expected
==
content
assert
content
==
expected
def
test_exporter_can_export_requirements_txt_with_nested_directory_packages
(
def
test_exporter_can_export_requirements_txt_with_nested_directory_packages
(
...
@@ -1213,7 +1213,7 @@ baz @ {working_directory.as_uri()}/tests/fixtures/project_with_nested_local
...
@@ -1213,7 +1213,7 @@ baz @ {working_directory.as_uri()}/tests/fixtures/project_with_nested_local
foo @ {working_directory.as_uri()}/tests/fixtures/sample_project
foo @ {working_directory.as_uri()}/tests/fixtures/sample_project
"""
"""
assert
expected
==
content
assert
content
==
expected
def
test_exporter_can_export_requirements_txt_with_directory_packages_and_markers
(
def
test_exporter_can_export_requirements_txt_with_directory_packages_and_markers
(
...
@@ -1257,7 +1257,7 @@ foo @ {working_directory.as_uri()}/tests/fixtures/sample_project\
...
@@ -1257,7 +1257,7 @@ foo @ {working_directory.as_uri()}/tests/fixtures/sample_project\
; python_version < "3.7"
; python_version < "3.7"
"""
"""
assert
expected
==
content
assert
content
==
expected
def
test_exporter_can_export_requirements_txt_with_file_packages
(
def
test_exporter_can_export_requirements_txt_with_file_packages
(
...
@@ -1299,7 +1299,7 @@ def test_exporter_can_export_requirements_txt_with_file_packages(
...
@@ -1299,7 +1299,7 @@ def test_exporter_can_export_requirements_txt_with_file_packages(
foo @ {working_directory.as_uri()}/tests/fixtures/distributions/demo-0.1.0.tar.gz
foo @ {working_directory.as_uri()}/tests/fixtures/distributions/demo-0.1.0.tar.gz
"""
"""
assert
expected
==
content
assert
content
==
expected
def
test_exporter_can_export_requirements_txt_with_file_packages_and_markers
(
def
test_exporter_can_export_requirements_txt_with_file_packages_and_markers
(
...
@@ -1343,7 +1343,7 @@ foo @ {working_directory.as_uri()}/tests/fixtures/distributions/demo-0.1.0.tar.g
...
@@ -1343,7 +1343,7 @@ foo @ {working_directory.as_uri()}/tests/fixtures/distributions/demo-0.1.0.tar.g
; python_version < "3.7"
; python_version < "3.7"
"""
"""
assert
expected
==
content
assert
content
==
expected
def
test_exporter_exports_requirements_txt_with_legacy_packages
(
def
test_exporter_exports_requirements_txt_with_legacy_packages
(
...
@@ -1403,7 +1403,7 @@ foo==1.2.3 \\
...
@@ -1403,7 +1403,7 @@ foo==1.2.3 \\
--hash=sha256:12345
--hash=sha256:12345
"""
"""
assert
expected
==
content
assert
content
==
expected
def
test_exporter_exports_requirements_txt_with_url_false
(
def
test_exporter_exports_requirements_txt_with_url_false
(
...
@@ -1463,7 +1463,7 @@ foo==1.2.3 \\
...
@@ -1463,7 +1463,7 @@ foo==1.2.3 \\
--hash=sha256:12345
--hash=sha256:12345
"""
"""
assert
expected
==
content
assert
content
==
expected
def
test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host
(
def
test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host
(
...
@@ -1514,7 +1514,7 @@ bar==4.5.6 \\
...
@@ -1514,7 +1514,7 @@ bar==4.5.6 \\
--hash=sha256:67890
--hash=sha256:67890
"""
"""
assert
expected
==
content
assert
content
==
expected
@pytest.mark.parametrize
(
@pytest.mark.parametrize
(
...
@@ -1662,7 +1662,7 @@ foo==1.2.3 \\
...
@@ -1662,7 +1662,7 @@ foo==1.2.3 \\
--hash=sha256:12345
--hash=sha256:12345
"""
"""
assert
expected
==
content
assert
content
==
expected
def
test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials
(
def
test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials
(
...
@@ -1731,7 +1731,7 @@ foo==1.2.3 \\
...
@@ -1731,7 +1731,7 @@ foo==1.2.3 \\
--hash=sha256:12345
--hash=sha256:12345
"""
"""
assert
expected
==
content
assert
content
==
expected
def
test_exporter_exports_requirements_txt_to_standard_output
(
def
test_exporter_exports_requirements_txt_to_standard_output
(
...
...
tests/utils/test_extras.py
View file @
b99b455d
...
@@ -65,6 +65,7 @@ def test_get_extra_package_names(
...
@@ -65,6 +65,7 @@ def test_get_extra_package_names(
extra_names
:
List
[
str
],
extra_names
:
List
[
str
],
expected_extra_package_names
:
List
[
str
],
expected_extra_package_names
:
List
[
str
],
):
):
assert
expected_extra_package_names
==
list
(
assert
(
get_extra_package_names
(
packages
,
extras
,
extra_names
)
list
(
get_extra_package_names
(
packages
,
extras
,
extra_names
))
==
expected_extra_package_names
)
)
tests/utils/test_setup_reader.py
View file @
b99b455d
...
@@ -44,11 +44,11 @@ def test_setup_reader_read_first_level_setup_call_with_direct_types(
...
@@ -44,11 +44,11 @@ def test_setup_reader_read_first_level_setup_call_with_direct_types(
}
}
expected_python_requires
=
">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*"
expected_python_requires
=
">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*"
assert
expected_name
==
result
[
"name"
]
assert
result
[
"name"
]
==
expected_name
assert
expected_version
==
result
[
"version"
]
assert
result
[
"version"
]
==
expected_version
assert
expected_install_requires
==
result
[
"install_requires"
]
assert
result
[
"install_requires"
]
==
expected_install_requires
assert
expected_extras_require
==
result
[
"extras_require"
]
assert
result
[
"extras_require"
]
==
expected_extras_require
assert
expected_python_requires
==
result
[
"python_requires"
]
assert
result
[
"python_requires"
]
==
expected_python_requires
def
test_setup_reader_read_first_level_setup_call_with_variables
(
def
test_setup_reader_read_first_level_setup_call_with_variables
(
...
@@ -71,11 +71,11 @@ def test_setup_reader_read_first_level_setup_call_with_variables(
...
@@ -71,11 +71,11 @@ def test_setup_reader_read_first_level_setup_call_with_variables(
}
}
expected_python_requires
=
">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
expected_python_requires
=
">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
assert
expected_name
==
result
[
"name"
]
assert
result
[
"name"
]
==
expected_name
assert
expected_version
==
result
[
"version"
]
assert
result
[
"version"
]
==
expected_version
assert
expected_install_requires
==
result
[
"install_requires"
]
assert
result
[
"install_requires"
]
==
expected_install_requires
assert
expected_extras_require
==
result
[
"extras_require"
]
assert
result
[
"extras_require"
]
==
expected_extras_require
assert
expected_python_requires
==
result
[
"python_requires"
]
assert
result
[
"python_requires"
]
==
expected_python_requires
def
test_setup_reader_read_sub_level_setup_call_with_direct_types
(
def
test_setup_reader_read_sub_level_setup_call_with_direct_types
(
...
@@ -97,10 +97,10 @@ def test_setup_reader_read_sub_level_setup_call_with_direct_types(
...
@@ -97,10 +97,10 @@ def test_setup_reader_read_sub_level_setup_call_with_direct_types(
"mssql_pymssql"
:
[
"pymssql"
],
"mssql_pymssql"
:
[
"pymssql"
],
}
}
assert
expected_name
==
result
[
"name"
]
assert
result
[
"name"
]
==
expected_name
assert
expected_version
==
result
[
"version"
]
assert
result
[
"version"
]
==
expected_version
assert
expected_install_requires
==
result
[
"install_requires"
]
assert
result
[
"install_requires"
]
==
expected_install_requires
assert
expected_extras_require
==
result
[
"extras_require"
]
assert
result
[
"extras_require"
]
==
expected_extras_require
assert
result
[
"python_requires"
]
is
None
assert
result
[
"python_requires"
]
is
None
...
@@ -116,11 +116,11 @@ def test_setup_reader_read_setup_cfg(setup: Callable[[str], str]):
...
@@ -116,11 +116,11 @@ def test_setup_reader_read_setup_cfg(setup: Callable[[str], str]):
}
}
expected_python_requires
=
">=2.6,!=3.0,!=3.1,!=3.2,!=3.3"
expected_python_requires
=
">=2.6,!=3.0,!=3.1,!=3.2,!=3.3"
assert
expected_name
==
result
[
"name"
]
assert
result
[
"name"
]
==
expected_name
assert
expected_version
==
result
[
"version"
]
assert
result
[
"version"
]
==
expected_version
assert
expected_install_requires
==
result
[
"install_requires"
]
assert
result
[
"install_requires"
]
==
expected_install_requires
assert
expected_extras_require
==
result
[
"extras_require"
]
assert
result
[
"extras_require"
]
==
expected_extras_require
assert
expected_python_requires
==
result
[
"python_requires"
]
assert
result
[
"python_requires"
]
==
expected_python_requires
def
test_setup_reader_read_setup_cfg_with_attr
(
setup
:
Callable
[[
str
],
str
]):
def
test_setup_reader_read_setup_cfg_with_attr
(
setup
:
Callable
[[
str
],
str
]):
...
@@ -137,11 +137,11 @@ def test_setup_reader_read_setup_kwargs(setup: Callable[[str], str]):
...
@@ -137,11 +137,11 @@ def test_setup_reader_read_setup_kwargs(setup: Callable[[str], str]):
expected_extras_require
=
{
':python_version < "3.5"'
:
[
"typing>=3.6,<4.0"
]}
expected_extras_require
=
{
':python_version < "3.5"'
:
[
"typing>=3.6,<4.0"
]}
expected_python_requires
=
">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
expected_python_requires
=
">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
assert
expected_name
==
result
[
"name"
]
assert
result
[
"name"
]
==
expected_name
assert
expected_version
==
result
[
"version"
]
assert
result
[
"version"
]
==
expected_version
assert
expected_install_requires
==
result
[
"install_requires"
]
assert
result
[
"install_requires"
]
==
expected_install_requires
assert
expected_extras_require
==
result
[
"extras_require"
]
assert
result
[
"extras_require"
]
==
expected_extras_require
assert
expected_python_requires
==
result
[
"python_requires"
]
assert
result
[
"python_requires"
]
==
expected_python_requires
def
test_setup_reader_read_setup_call_in_main
(
setup
:
Callable
[[
str
],
str
]):
def
test_setup_reader_read_setup_call_in_main
(
setup
:
Callable
[[
str
],
str
]):
...
@@ -153,11 +153,11 @@ def test_setup_reader_read_setup_call_in_main(setup: Callable[[str], str]):
...
@@ -153,11 +153,11 @@ def test_setup_reader_read_setup_call_in_main(setup: Callable[[str], str]):
expected_extras_require
=
{}
expected_extras_require
=
{}
expected_python_requires
=
None
expected_python_requires
=
None
assert
expected_name
==
result
[
"name"
]
assert
result
[
"name"
]
==
expected_name
assert
expected_version
==
result
[
"version"
]
assert
result
[
"version"
]
==
expected_version
assert
expected_install_requires
==
result
[
"install_requires"
]
assert
result
[
"install_requires"
]
==
expected_install_requires
assert
expected_extras_require
==
result
[
"extras_require"
]
assert
result
[
"extras_require"
]
==
expected_extras_require
assert
expected_python_requires
==
result
[
"python_requires"
]
assert
result
[
"python_requires"
]
==
expected_python_requires
def
test_setup_reader_read_extras_require_with_variables
(
setup
:
Callable
[[
str
],
str
]):
def
test_setup_reader_read_extras_require_with_variables
(
setup
:
Callable
[[
str
],
str
]):
...
@@ -169,11 +169,11 @@ def test_setup_reader_read_extras_require_with_variables(setup: Callable[[str],
...
@@ -169,11 +169,11 @@ def test_setup_reader_read_extras_require_with_variables(setup: Callable[[str],
expected_extras_require
=
{
"test"
:
[
"pytest"
]}
expected_extras_require
=
{
"test"
:
[
"pytest"
]}
expected_python_requires
=
None
expected_python_requires
=
None
assert
expected_name
==
result
[
"name"
]
assert
result
[
"name"
]
==
expected_name
assert
expected_version
==
result
[
"version"
]
assert
result
[
"version"
]
==
expected_version
assert
expected_install_requires
==
result
[
"install_requires"
]
assert
result
[
"install_requires"
]
==
expected_install_requires
assert
expected_extras_require
==
result
[
"extras_require"
]
assert
result
[
"extras_require"
]
==
expected_extras_require
assert
expected_python_requires
==
result
[
"python_requires"
]
assert
result
[
"python_requires"
]
==
expected_python_requires
def
test_setup_reader_setuptools
(
setup
:
Callable
[[
str
],
str
]):
def
test_setup_reader_setuptools
(
setup
:
Callable
[[
str
],
str
]):
...
@@ -182,5 +182,5 @@ def test_setup_reader_setuptools(setup: Callable[[str], str]):
...
@@ -182,5 +182,5 @@ def test_setup_reader_setuptools(setup: Callable[[str], str]):
expected_name
=
"my_package"
expected_name
=
"my_package"
expected_version
=
"0.1.2"
expected_version
=
"0.1.2"
assert
expected_name
==
result
[
"name"
]
assert
result
[
"name"
]
==
expected_name
assert
expected_version
==
result
[
"version"
]
assert
result
[
"version"
]
==
expected_version
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