Skip to content

PythonAPITests

Anastasia Kuporosova edited this page Dec 6, 2022 · 3 revisions

How to run Python API tests

In the following instructions, for all commands, we assume that they are executed from the src/bindings/python directory unless otherwise noted.

For testing OpenVINO Python API you need to do next steps:

  1. Change directory to the Python API root folder:
cd src/bindings/python
  1. Install the special requirements file for testing:
python -m pip install -r requirements_test.txt

Run Python API tests

For running python API test execute this command:

python -m pytest tests/

For running compatibility tests execute this command:

python -m pytest tests_compatibility/

Check codestyle of Python API

For checking the codestyle of Python API execute this command:

python -m flake8 ./src/openvino --config=setup.cfg

For checking the codestyle of compatibility nGraph Python API execute this command:

python -m flake8 ./src/compatibility/ngraph --config=setup.cfg

For checking the codestyle of compatibility InferenceEngine Python API execute this command:

cd src/compatibility/openvino
python -m flake8 ./ --config=setup.cfg
Clone this wiki locally