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
0907d33b
Unverified
Commit
0907d33b
authored
Jul 06, 2022
by
Randy Döring
Committed by
GitHub
Jul 06, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: make tests forward compatible for tomlkit fix for consistent line endings (#5951)
parent
ae03bdcd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
6 deletions
+30
-6
tests/console/commands/test_add.py
+8
-2
tests/console/commands/test_remove.py
+22
-4
No files found.
tests/console/commands/test_add.py
View file @
0907d33b
...
...
@@ -870,8 +870,14 @@ Package operations: 1 install, 0 updates, 0 removals
cachy = "^0.2.0"
"""
assert
expected
in
content
.
as_string
()
# At the moment line endings will be inconsistent on Windows.
# See https://github.com/sdispater/tomlkit/issues/200 for details.
# https://github.com/sdispater/tomlkit/pull/201 fixes this issue
# In order to make tests forward compatible for tomlkit downstream tests,
# we replace "\r\n" with "\n" for now.
string_content
=
content
.
as_string
()
.
replace
(
"
\r\n
"
,
"
\n
"
)
assert
expected
in
string_content
def
test_add_to_dev_section_deprecated
(
...
...
tests/console/commands/test_remove.py
View file @
0907d33b
...
...
@@ -93,8 +93,14 @@ baz = "^1.0.0"
baz = "^1.0.0"
"""
# At the moment line endings will be inconsistent on Windows.
# See https://github.com/sdispater/tomlkit/issues/200 for details.
# https://github.com/sdispater/tomlkit/pull/201 fixes this issue
# In order to make tests forward compatible for tomlkit downstream tests,
# we replace "\r\n" with "\n" for now.
string_content
=
content
.
as_string
()
.
replace
(
"
\r\n
"
,
"
\n
"
)
assert
expected
in
content
.
as_string
()
assert
expected
in
string_content
def
test_remove_without_specific_group_removes_from_specific_groups
(
...
...
@@ -148,8 +154,14 @@ baz = "^1.0.0"
baz = "^1.0.0"
"""
# At the moment line endings will be inconsistent on Windows.
# See https://github.com/sdispater/tomlkit/issues/200 for details.
# https://github.com/sdispater/tomlkit/pull/201 fixes this issue
# In order to make tests forward compatible for tomlkit downstream tests,
# we replace "\r\n" with "\n" for now.
string_content
=
content
.
as_string
()
.
replace
(
"
\r\n
"
,
"
\n
"
)
assert
expected
in
content
.
as_string
()
assert
expected
in
string_content
def
test_remove_does_not_live_empty_groups
(
...
...
@@ -251,8 +263,14 @@ baz = "^1.0.0"
baz = "^1.0.0"
"""
assert
expected
in
content
.
as_string
()
# At the moment line endings will be inconsistent on Windows.
# See https://github.com/sdispater/tomlkit/issues/200 for details.
# https://github.com/sdispater/tomlkit/pull/201 fixes this issue
# In order to make tests forward compatible for tomlkit downstream tests,
# we replace "\r\n" with "\n" for now.
string_content
=
content
.
as_string
()
.
replace
(
"
\r\n
"
,
"
\n
"
)
assert
expected
in
string_content
def
test_remove_command_should_not_write_changes_upon_installer_errors
(
...
...
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