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

refactor: Migrates Python tests to pytest #413

Merged
merged 4 commits into from
Dec 13, 2024

Conversation

pranavm-nvidia
Copy link
Contributor

@pranavm-nvidia pranavm-nvidia commented Nov 22, 2024

Migrates test_api.py to pytest

Migrates test_api.py to pytest and removes unittest. Changes setup functions
to fixtures and replaces unittest assertion methods with regular Python asserts.

Also lowers the timeout for the server to make the tests run a bit faster.

Updates test_binding.py to use pytest

Replaces all unittest APIs with equivalent pytest ones. This change
also updates the tests to use tempfile instead of manually creating and
removing files and directories.

Parametrizes tests instead of running loops

@rmccorm4 rmccorm4 requested review from rmccorm4 and GuanLuo November 23, 2024 01:08
@pranavm-nvidia pranavm-nvidia changed the title Migrates Python tests to pytest test: Migrates Python tests to pytest Dec 10, 2024
Migrates test_api.py to pytest and removes `unittest`. Changes setup functions
to fixtures and replaces `unittest` assertion methods with regular Python `assert`s.

Also lowers the timeout for the server to make the tests run a bit faster.
Replaces all `unittest` APIs with equivalent `pytest` ones. This change
also updates the tests to use `tempfile` instead of manually creating and
removing files and directories.
@pranavm-nvidia pranavm-nvidia force-pushed the improve-tests branch 3 times, most recently from c815df7 to f911d7d Compare December 13, 2024 23:21
@rmccorm4 rmccorm4 changed the title test: Migrates Python tests to pytest refactor: Migrates Python tests to pytest Dec 13, 2024
@rmccorm4 rmccorm4 merged commit f7ff33f into triton-inference-server:main Dec 13, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants