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

✅ Refactor test_enums to make them independent of previous imports #1095

Merged
merged 1 commit into from
Aug 31, 2024

Conversation

tiangolo
Copy link
Member

@tiangolo tiangolo commented Aug 31, 2024

✅ Refactor test_enums to make them independent of previous imports

These tests are currently passing only because they are the first ones to be imported. But adding other tests before them, as in #1093 makes them fail.

With this refactor, because SQLModel and the metadata are cleared in a text fixture, and then the models are imported/reloaded, they are independent of anything else that could be loaded or registered.

@tiangolo tiangolo marked this pull request as ready for review August 31, 2024 09:33
@tiangolo tiangolo merged commit e4f3ec7 into main Aug 31, 2024
28 of 29 checks passed
@tiangolo tiangolo deleted the test-enums branch August 31, 2024 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant