Skip to content

Commit

Permalink
Adapt expectation to improvement in union of markers (#5126)
Browse files Browse the repository at this point in the history
  • Loading branch information
radoering authored Jan 30, 2022
1 parent b1f5f22 commit 08ed8ed
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions tests/utils/test_exporter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sys
import textwrap

from pathlib import Path
from typing import TYPE_CHECKING
Expand Down Expand Up @@ -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:
content = f.read()

expected = """\
bar==7.8.9 ; platform_system != "Windows" or platform_system == "Windows"
baz==10.11.13 ; platform_system == "Windows"
foo==1.2.3
"""
expected = (
# expectation for poetry-core <= 1.1.0a6
textwrap.dedent(
"""\
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(
Expand Down

0 comments on commit 08ed8ed

Please sign in to comment.