-
Notifications
You must be signed in to change notification settings - Fork 435
infra: upgrade pytest and use pytest_lazy_fixtures #2978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,7 +45,7 @@ | |
| import pytest | ||
| from moto import mock_aws | ||
| from pydantic_core import to_json | ||
| from pytest_lazyfixture import lazy_fixture | ||
| from pytest_lazy_fixtures import lf | ||
|
|
||
| from pyiceberg.catalog import Catalog, load_catalog | ||
| from pyiceberg.catalog.memory import InMemoryCatalog | ||
|
|
@@ -3080,23 +3080,21 @@ def fixed_test_table_namespace() -> Identifier: | |
|
|
||
|
|
||
| @pytest.fixture( | ||
| scope="session", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is removed because its references ( I think this is a new requirement from |
||
| params=[ | ||
| lazy_fixture("fixed_test_table_identifier"), | ||
| lazy_fixture("random_table_identifier"), | ||
| lazy_fixture("random_hierarchical_identifier"), | ||
| lf("fixed_test_table_identifier"), | ||
| lf("random_table_identifier"), | ||
| lf("random_hierarchical_identifier"), | ||
| ], | ||
| ) | ||
| def test_table_identifier(request: pytest.FixtureRequest) -> Identifier: | ||
| return request.param | ||
|
|
||
|
|
||
| @pytest.fixture( | ||
| scope="session", | ||
| params=[ | ||
| lazy_fixture("another_fixed_test_table_identifier"), | ||
| lazy_fixture("another_random_table_identifier"), | ||
| lazy_fixture("another_random_hierarchical_identifier"), | ||
| lf("another_fixed_test_table_identifier"), | ||
| lf("another_random_table_identifier"), | ||
| lf("another_random_hierarchical_identifier"), | ||
| ], | ||
| ) | ||
| def another_table_identifier(request: pytest.FixtureRequest) -> Identifier: | ||
|
|
@@ -3105,9 +3103,9 @@ def another_table_identifier(request: pytest.FixtureRequest) -> Identifier: | |
|
|
||
| @pytest.fixture( | ||
| params=[ | ||
| lazy_fixture("database_name"), | ||
| lazy_fixture("hierarchical_namespace_name"), | ||
| lazy_fixture("fixed_test_table_namespace"), | ||
| lf("database_name"), | ||
| lf("hierarchical_namespace_name"), | ||
| lf("fixed_test_table_namespace"), | ||
| ], | ||
| ) | ||
| def test_namespace(request: pytest.FixtureRequest) -> Identifier: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love the shorthand 👍