Skip to content

Commit

Permalink
backwards-compatible test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dimbleby committed May 8, 2022
1 parent 8c4cc2f commit 941c93e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/console/commands/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,9 @@ def test_search(tester: CommandTester, http: type[httpretty.httpretty]):
SAP Sybase SQL Anywhere dialect for SQLAlchemy
"""

assert tester.io.fetch_output() == expected
# TODO remove this when https://github.com/python-poetry/poetry-core/pull/328
# reaches a published version of poetry-core.
output = tester.io.fetch_output()
output = output.replace("transmogrify.sqlalchemy", "transmogrify-sqlalchemy")

assert output == expected
10 changes: 10 additions & 0 deletions tests/installation/test_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,16 @@ def test_installer_with_pypi_repository(
installer.run()

expected = fixture("with-pypi-repository")

# TODO remove this when https://github.com/python-poetry/poetry-core/pull/328
# reaches a published version of poetry-core.
# print(locker.written_data.keys())
# assert False
extras = locker.written_data["package"][0]["extras"]
for key, values in list(extras.items()):
extras[key] = [
value.replace("zope.interface", "zope-interface") for value in values
]
assert not DeepDiff(expected, locker.written_data, ignore_order=True)


Expand Down
10 changes: 10 additions & 0 deletions tests/installation/test_installer_old.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,16 @@ def test_installer_with_pypi_repository(
installer.run()

expected = fixture("with-pypi-repository")

# TODO remove this when https://github.com/python-poetry/poetry-core/pull/328
# reaches a published version of poetry-core.
# print(locker.written_data.keys())
# assert False
extras = locker.written_data["package"][0]["extras"]
for key, values in list(extras.items()):
extras[key] = [
value.replace("zope.interface", "zope-interface") for value in values
]
assert not DeepDiff(expected, locker.written_data, ignore_order=True)


Expand Down

0 comments on commit 941c93e

Please sign in to comment.