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

Read-write tests #4

Merged
merged 2 commits into from
Dec 17, 2023
Merged

Read-write tests #4

merged 2 commits into from
Dec 17, 2023

Conversation

Natooz
Copy link
Contributor

@Natooz Natooz commented Dec 17, 2023

This PR adds MIDI read-write tests, within a dedicated tests module to be used with pytest. (not run yet)
The next part is to figure how to run them in GitHub actions, probably after the wheel builds on each platform.

It also adds a ruff.toml configuration, which is passing right now. Ultimately more rules should be enforced (that would need fixes).

@Yikai-Liao Yikai-Liao marked this pull request as ready for review December 17, 2023 10:15
@@ -60,7 +61,7 @@ def __call__(self, ttype: Union[smt.TimeUnit, str]) -> smt.TimeUnit:
ttype.is_time_unit()
return ttype
except AttributeError:
raise TypeError(f"{ttype} is not a TimeUnit object")
raise TypeError(f"{ttype} is not a TimeUnit object") from None
Copy link
Owner

Choose a reason for hiding this comment

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

What's the from None for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To indicate what's causing the issue, flagged by ruff
I actually just updated it with except AttributeError as e and from e

@Yikai-Liao Yikai-Liao merged commit 0ed98ad into Yikai-Liao:main Dec 17, 2023
@Natooz
Copy link
Contributor Author

Natooz commented Dec 17, 2023

Thank you for the merge, I'm now working on the CI integration, and actually running them :)

@Natooz Natooz mentioned this pull request Dec 17, 2023
@Natooz Natooz deleted the read-write-tests branch December 20, 2023 11:07
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