Skip to content

Latest commit

 

History

History

tests

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

⚠️ Notice: Limited Maintenance

This project is no longer actively maintained. While existing releases remain available, there are no planned updates, bug fixes, new features, or security patches. Users should be aware that vulnerabilities may not be addressed.

Testing TorchServe

Pre-requisites

You will need some additional Python modules to run the unit tests and linting.

pip install mock pytest pylint pytest-mock pytest-cov

You will also need the source for the project, so clone the project first.

git clone https://github.com/pytorch/serve.git
cd serve

Unit Tests

You can run the unit tests with the following:

python -m pytest ts/tests/unit_tests/

To get the coverage report of unit tests, you can run :

python -m pytest --cov-report term-missing --cov=ts/ ts/tests/unit_tests/

or:

python -m pytest --cov-report html:htmlcov --cov=ts/ ts/tests/unit_tests/

Lint test

You can run the lint tests with the following:

pylint -rn --rcfile=./ts/tests/pylintrc ts/.