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

Faster tango tests #684

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Faster tango tests #684

wants to merge 4 commits into from

Conversation

jsouter
Copy link
Contributor

@jsouter jsouter commented Nov 29, 2024

Closing #667

Primarily reduces the number of tests by moving parametrized parameters inside the test -> reduces the total number of forks. Am investigating if it's possible to fork after the fixtures are loaded in case we want to retain the nice logging that prints pass/fail per parametrized test.

Also some small QOL changes, using a dataclass to make looping over ATTRIBUTES_SET nicer

@jsouter jsouter linked an issue Nov 29, 2024 that may be closed by this pull request
@evalott100
Copy link
Contributor

As part of this, can we change from using

def pytest_collection_modifyitems(config, items):
tango_dir = "tests/tango"
for item in items:
if tango_dir in str(item.fspath):
item.add_marker(pytest.mark.forked)

to putting an explicit @pytest.mark.forked on the tests (we can remove the @pytest.mark.asyncio).

@jsouter
Copy link
Contributor Author

jsouter commented Dec 2, 2024

As part of this, can we change from using

def pytest_collection_modifyitems(config, items):
tango_dir = "tests/tango"
for item in items:
if tango_dir in str(item.fspath):
item.add_marker(pytest.mark.forked)

to putting an explicit @pytest.mark.forked on the tests (we can remove the @pytest.mark.asyncio).

Yep I like this, potentially makes it easier to unfork specific tests (though currently don't think there are any that can be).

@evalott100
Copy link
Contributor

I'm having much difficulty trying to adjust tango tests to work in 3.12.

I'll wait for this to be merged before I continue trying.

@jsouter
Copy link
Contributor Author

jsouter commented Dec 2, 2024

I'm having much difficulty trying to adjust tango tests to work in 3.12.

I'll wait for this to be merged before I continue trying.

Looks like tests are broken on main for me right now, are you seeing that?

@evalott100
Copy link
Contributor

evalott100 commented Dec 2, 2024

Looks like tests are broken on main for me right now, are you seeing that?

They're broken on main if using 3.12, but they work for me on the other versions?

Edit

Ah nevermind, it's happening on main too... After playing around with it for ages I'm thinking it's best to solve this first:

#681

The error is very elusive.

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.

Make the Tango tests faster
2 participants