Skip to content

Commit

Permalink
tests: make canonical names forwards compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
dimbleby authored May 8, 2022
1 parent 1c1cb92 commit c919674
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
9 changes: 7 additions & 2 deletions tests/console/commands/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def test_search(tester: CommandTester, http: type[httpretty.httpretty]):
sqlalchemy-audit (0.1.0)
sqlalchemy-audit provides an easy way to set up revision tracking for your data.
transmogrify.sqlalchemy (1.0.2)
transmogrify-sqlalchemy (1.0.2)
Feed data from SQLAlchemy into a transmogrifier pipeline
sqlalchemy-schemadisplay (1.3)
Expand Down 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
6 changes: 3 additions & 3 deletions tests/installation/fixtures/with-pypi-repository.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ optional = false
python-versions = "*"

[package.extras]
dev = ["coverage", "hypothesis", "pympler", "pytest", "six", "zope.interface", "sphinx", "zope.interface"]
docs = ["sphinx", "zope.interface"]
tests = ["coverage", "hypothesis", "pympler", "pytest", "six", "zope.interface"]
dev = ["coverage", "hypothesis", "pympler", "pytest", "six", "zope-interface", "sphinx", "zope-interface"]
docs = ["sphinx", "zope-interface"]
tests = ["coverage", "hypothesis", "pympler", "pytest", "six", "zope-interface"]

[[package]]
name = "colorama"
Expand Down
8 changes: 8 additions & 0 deletions tests/installation/test_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1168,6 +1168,14 @@ 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.
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
8 changes: 8 additions & 0 deletions tests/installation/test_installer_old.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,14 @@ 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.
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 c919674

Please sign in to comment.