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

test: replace unittest with pytest #2407

Merged
merged 7 commits into from
Jan 15, 2024

Conversation

bwanglzu
Copy link
Contributor

@bwanglzu bwanglzu commented Jan 13, 2024

What has been changed:

I refactored all tests dependent on unittest, replaced with pytest. Note: no testing behaviour was changed.

Some general things should be further improved:

  1. figure out a better way to perform integration tests, especially validate training behaviour.
  2. testing model inference involves a lot of model downloading, maybe test from HF inference endpoint?
  3. convert tests into real "unittest" and mock responses.

Fast tests all passed (pytest -s -v tests):

============================== 32 passed, 1 skipped, 11 deselected, 4 warnings in 402.78s (0:06:42) ==============================

slow tests all passed (pytest -s -v -m slow tests):

=================================== 11 passed, 33 deselected, 4 warnings in 3311.94s (0:55:11) ===================================

@bwanglzu bwanglzu marked this pull request as ready for review January 13, 2024 11:45
@tomaarsen tomaarsen merged commit 056d9b4 into UKPLab:master Jan 15, 2024
9 checks passed
@tomaarsen
Copy link
Collaborator

Thanks a bunch for these changes! I'm happy to merge this after some small edits :)

@bwanglzu bwanglzu deleted the test-remove-unittest branch January 15, 2024 11:26
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