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

Speed up tests by gently patching mido to not do useless work #44

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

akx
Copy link
Contributor

@akx akx commented Nov 27, 2023

See within.

I ran pytest --prof (pytest-profiling) and noticed most of the time was spent in mido – we could assume the test MIDIs in this repository are valid enough.

Related: mido/mido#565

@akx akx marked this pull request as ready for review November 28, 2023 12:26
Copy link
Collaborator

@Natooz Natooz left a comment

Choose a reason for hiding this comment

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

Nice catch on this one! Just added a suggestion to remind for when the fixtures will not be necessary

tests/conftest.py Show resolved Hide resolved
@akx
Copy link
Contributor Author

akx commented Nov 29, 2023

@Natooz Yeah, turns out there are no tests in mido that would parse actual real-life MIDI files, so the performance impact isn't really caught 😅

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (09122ef) 61.51% compared to head (11c1145) 61.95%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #44      +/-   ##
==========================================
+ Coverage   61.51%   61.95%   +0.43%     
==========================================
  Files          13       14       +1     
  Lines         790      799       +9     
==========================================
+ Hits          486      495       +9     
  Misses        304      304              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Natooz
Copy link
Collaborator

Natooz commented Nov 29, 2023

That's still nice to have. Thank you! :)

@Natooz Natooz merged commit 2612957 into YatingMusic:master Nov 29, 2023
17 checks passed
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.

None yet

3 participants