Skip to content

Add slow marker to multiple test cases #699

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cpaniaguam
Copy link
Collaborator

This pull request introduces the @pytest.mark.slow decorator to multiple test functions across various test files. This change helps categorize tests that are expected to take a longer time to run, allowing for better test management and execution control.

Criterion: Test file takes longer than ~5 seconds to run.

To exclude any test marked as slow use -m "not slow" option in the pytest command.

Copilot

This comment was marked as resolved.

Copy link
Collaborator

@AlexanderFengler AlexanderFengler left a comment

Choose a reason for hiding this comment

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

Looks fine to me, but don't understand some of the slow markings. E.g. the first: test_data_sanity.py --> was this a slow test?

@cpaniaguam

Copy link
Collaborator

@AlexanderFengler AlexanderFengler left a comment

Choose a reason for hiding this comment

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

one more comment, looking into the pytest.mark command a bit more, it seems like one should "register" the slow command in conftest.py? @cpaniaguam

@cpaniaguam
Copy link
Collaborator Author

Looks fine to me, but don't understand some of the slow markings. E.g. the first: test_data_sanity.py --> was this a slow test?

@cpaniaguam

Tests that take longer than 5 secs I am marking as slow so I can run quick checks after making changes locally. The ones that take a really long time are in tests/slow/.

Also, I don't totally understand why CI is not passing. Something to do with the types of floats for onnx. Can you take a look? @AlexanderFengler

@AlexanderFengler
Copy link
Collaborator

@cpaniaguam the test that fails should be failing everywhere now right?
Slightly confused.

@cpaniaguam
Copy link
Collaborator Author

one more comment, looking into the pytest.mark command a bit more, it seems like one should "register" the slow command in conftest.py? @cpaniaguam

I'll look into it as this is a bit new to me.

@cpaniaguam
Copy link
Collaborator Author

@cpaniaguam the test that fails should be failing everywhere now right? Slightly confused.

I'm more confused than you are. All tests pass for me locally. Not sure if something changed in the gh runners.

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.

2 participants