Commit 0907d33b by Randy Döring Committed by GitHub

tests: make tests forward compatible for tomlkit fix for consistent line endings (#5951)

parent ae03bdcd
...@@ -870,8 +870,14 @@ Package operations: 1 install, 0 updates, 0 removals ...@@ -870,8 +870,14 @@ Package operations: 1 install, 0 updates, 0 removals
cachy = "^0.2.0" cachy = "^0.2.0"
""" """
# At the moment line endings will be inconsistent on Windows.
assert expected in content.as_string() # 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( def test_add_to_dev_section_deprecated(
......
...@@ -93,8 +93,14 @@ baz = "^1.0.0" ...@@ -93,8 +93,14 @@ baz = "^1.0.0"
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( def test_remove_without_specific_group_removes_from_specific_groups(
...@@ -148,8 +154,14 @@ baz = "^1.0.0" ...@@ -148,8 +154,14 @@ baz = "^1.0.0"
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( def test_remove_does_not_live_empty_groups(
...@@ -251,8 +263,14 @@ baz = "^1.0.0" ...@@ -251,8 +263,14 @@ baz = "^1.0.0"
baz = "^1.0.0" baz = "^1.0.0"
""" """
# At the moment line endings will be inconsistent on Windows.
assert expected in content.as_string() # 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( def test_remove_command_should_not_write_changes_upon_installer_errors(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment