Commit 08ed8ed1 by Randy Döring Committed by GitHub

Adapt expectation to improvement in union of markers (#5126)

parent b1f5f22c
import sys import sys
import textwrap
from pathlib import Path from pathlib import Path
from typing import TYPE_CHECKING from typing import TYPE_CHECKING
...@@ -1040,13 +1041,26 @@ def test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_ ...@@ -1040,13 +1041,26 @@ def test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_
with (Path(tmp_dir) / "requirements.txt").open(encoding="utf-8") as f: with (Path(tmp_dir) / "requirements.txt").open(encoding="utf-8") as f:
content = f.read() content = f.read()
expected = """\ expected = (
bar==7.8.9 ; platform_system != "Windows" or platform_system == "Windows" # expectation for poetry-core <= 1.1.0a6
baz==10.11.13 ; platform_system == "Windows" textwrap.dedent(
foo==1.2.3 """\
""" bar==7.8.9 ; platform_system != "Windows" or platform_system == "Windows"
baz==10.11.13 ; platform_system == "Windows"
foo==1.2.3
"""
),
# expectation for poetry-core > 1.1.0a6
textwrap.dedent(
"""\
bar==7.8.9
baz==10.11.13 ; platform_system == "Windows"
foo==1.2.3
"""
),
)
assert expected == content assert content in expected
def test_exporter_can_export_requirements_txt_with_git_packages_and_markers( def test_exporter_can_export_requirements_txt_with_git_packages_and_markers(
......
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