Skip to content
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

modify tests to not raise deprecation warnings #1047

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

07pepa
Copy link
Member

@07pepa 07pepa commented Oct 9, 2024

No description provided.

@07pepa 07pepa force-pushed the remove-deprecated-stuff branch from 9b72a6c to 743c1c8 Compare October 9, 2024 20:37
@@ -1136,7 +1136,7 @@ async def inspect_collection(
return inspection_result

@classmethod
def check_hidden_fields(cls):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imho this should not be public method

@@ -197,118 +297,38 @@ async def session(cli):
await s.end_session()


@pytest.fixture()
async def deprecated_init_beanie(db):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wanted to explicitly separate deprecated usages from not deprecated ones
i also added assertions those deprecations are actualy raised

@07pepa 07pepa changed the title modify tests so we no-longer have to filter for deprecation warnings modify tests to not raise deprecation warnings Oct 10, 2024
Copy link

@LawMixer LawMixer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the other review covered what i would change

Copy link
Contributor

@CAPITAINMARVEL CAPITAINMARVEL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@07pepa 07pepa force-pushed the remove-deprecated-stuff branch from 743c1c8 to cc49c2a Compare October 11, 2024 07:24
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")

await init_beanie(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only one slight "issue" is that now init_beanie will be executed twice (but I guess this is fine), since there is an autouse init fixture in this file as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes geting rid of auto use would be hard.... i am fully aware of it...

@07pepa 07pepa merged commit 3421d55 into BeanieODM:main Oct 14, 2024
51 checks passed
@07pepa 07pepa deleted the remove-deprecated-stuff branch October 14, 2024 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants