Skip to content

Commit

Permalink
prefer actual-expected order in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
radoering committed Apr 9, 2022
1 parent c90768c commit 3b17fcf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/command/test_command_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def _export_requirements(tester: CommandTester, poetry: Poetry) -> None:
foo==1.0.0 ; {MARKER_PY}
"""

assert expected == content
assert content == expected


def test_export_exports_requirements_txt_file_locks_if_no_lock_file(
Expand Down Expand Up @@ -116,7 +116,7 @@ def test_export_prints_to_stdout_by_default(tester: CommandTester, do_lock: None
expected = f"""\
foo==1.0.0 ; {MARKER_PY}
"""
assert expected == tester.io.fetch_output()
assert tester.io.fetch_output() == expected


def test_export_uses_requirements_txt_format_by_default(
Expand All @@ -126,7 +126,7 @@ def test_export_uses_requirements_txt_format_by_default(
expected = f"""\
foo==1.0.0 ; {MARKER_PY}
"""
assert expected == tester.io.fetch_output()
assert tester.io.fetch_output() == expected


def test_export_includes_extras_by_flag(tester: CommandTester, do_lock: None):
Expand All @@ -135,7 +135,7 @@ def test_export_includes_extras_by_flag(tester: CommandTester, do_lock: None):
bar==1.1.0 ; {MARKER_PY}
foo==1.0.0 ; {MARKER_PY}
"""
assert expected == tester.io.fetch_output()
assert tester.io.fetch_output() == expected


def test_export_with_urls(
Expand Down

0 comments on commit 3b17fcf

Please sign in to comment.