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

ci: overhaul test data #114

Merged
merged 8 commits into from
Apr 20, 2023
Merged

ci: overhaul test data #114

merged 8 commits into from
Apr 20, 2023

Conversation

jsstevenson
Copy link
Member

@jsstevenson jsstevenson commented Apr 19, 2023

close #107 (I have no idea what "update branch protection" was referring to)

@jsstevenson jsstevenson marked this pull request as ready for review April 19, 2023 20:03
@jsstevenson jsstevenson added the priority:medium Medium priority label Apr 19, 2023
korikuzma
korikuzma previously approved these changes Apr 19, 2023

def pytest_collection_modifyitems(items):
"""Modify test items in place to ensure test modules run in a given order.
When creating new test modules, be sure to add them here.
Copy link
Member

Choose a reason for hiding this comment

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

I had thought in a different project we made a check to ensure len(MODULE_ORDER) == len(# of files that start with test_)

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch! I think we did that in anyvar.

def test_source_factory(EtlClass: Base):
if os.environ.get("DISEASE_TEST", "").lower() == "true":
test_class = EtlClass(db, test_data) # type: ignore
if EtlClass.__name__ == "Mondo": # type: ignore
Copy link
Member

Choose a reason for hiding this comment

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

Use enum for source name

@jsstevenson jsstevenson merged commit 39f930f into main Apr 20, 2023
8 checks passed
@jsstevenson jsstevenson deleted the test-fixtures branch April 20, 2023 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:medium Medium priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Overhaul test fixtures
2 participants