From 8c4cc2f8f26817b990d60f1629c2009c1e2895ce Mon Sep 17 00:00:00 2001 From: David Hotham Date: Thu, 21 Apr 2022 20:23:09 +0100 Subject: [PATCH 1/2] canonicalized package names cf https://github.com/python-poetry/poetry-core/pull/328 --- tests/console/commands/test_search.py | 2 +- tests/installation/fixtures/with-pypi-repository.test | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/console/commands/test_search.py b/tests/console/commands/test_search.py index 47aa4d06316..40d630558d4 100644 --- a/tests/console/commands/test_search.py +++ b/tests/console/commands/test_search.py @@ -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) diff --git a/tests/installation/fixtures/with-pypi-repository.test b/tests/installation/fixtures/with-pypi-repository.test index d1ed1ae55ed..27fee8ce755 100644 --- a/tests/installation/fixtures/with-pypi-repository.test +++ b/tests/installation/fixtures/with-pypi-repository.test @@ -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" From d1ba3fe6084cc02fb35151159e27c1cd7ff6831b Mon Sep 17 00:00:00 2001 From: David Hotham Date: Sun, 8 May 2022 15:44:06 +0100 Subject: [PATCH 2/2] backwards-compatible test fix --- tests/console/commands/test_search.py | 7 ++++++- tests/installation/test_installer.py | 8 ++++++++ tests/installation/test_installer_old.py | 8 ++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/tests/console/commands/test_search.py b/tests/console/commands/test_search.py index 40d630558d4..185717df425 100644 --- a/tests/console/commands/test_search.py +++ b/tests/console/commands/test_search.py @@ -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 diff --git a/tests/installation/test_installer.py b/tests/installation/test_installer.py index b330b46a728..d9c12388bd6 100644 --- a/tests/installation/test_installer.py +++ b/tests/installation/test_installer.py @@ -1162,6 +1162,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) diff --git a/tests/installation/test_installer_old.py b/tests/installation/test_installer_old.py index 86b15093b26..e30e4956c6d 100644 --- a/tests/installation/test_installer_old.py +++ b/tests/installation/test_installer_old.py @@ -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)