Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
 
 

README.md

Outline

Python CryptoAuthLib Module Testing

Introduction

These tests are designed to only test the python interface to the library and are not designed to test the library itself which is covered by the main cryptoauthlib tests

Running

The best way to run the test suite is to use tox which can be easily installed with pip:

$ pip install tox

From the python folder:

:~/cryptoauthlib/python $ tox

It is possible to directly run tests but requires more setup

  1. Install pytest
$ pip install pytest
  1. Modify the PYTHONPATH environment variable

Windows:

cryptoauthlib/python> set PYTHONPATH=<path_to>/cryptoauthlib/python

Linux:

$ export PYTHONPATH=${PYTHONPATH}:<path_to>/cryptoauthlib/python
  1. Run the tests
$ pytest -vv

Test options

There are additional options that can be invoked with the tests that define what tests will be run

  1. --with-lib will attempt to run tests against the compiled c library. These tests are good for detecting possible platform incompabilities between the C compiler and the expectations of python

  2. --with-device will attempt to invoke some tests with a real attached device These tests are restricted to only the minimum required to verify the python to library connectivity and are only meant to detect situations can can not be determined from the library tests alone.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.