You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Petri Alapiessa 154c3609ee Unit tests for pricer-module 2 weeks ago
..
pricer Unit tests for pricer-module 2 weeks ago
tests Unit tests for pricer-module 2 weeks ago
README.md Unit tests for pricer-module 2 weeks ago
requirements.txt Unit tests for pricer-module 2 weeks ago

README.md

Run Continuous Integration (CI) Tests on Modal

Unit testing

Unit test strategy created like in This example repo

Usage

All commands below are run from the root of the repository (this directory). Note: I removed modal-decorators from pricer.ci-module to be able to run unit tests.

Run tests remotely on Modal

modal run pricer.ci::pytest

On the first execution, the container image for your application will be built.

This image will be cached on Modal and only rebuilt if one of its dependencies, like the requirements.txt file, changes.

Debug tests running remotely

To debug the tests, you can open a shell in the exact same environment that the tests are run in:

modal shell pricer.ci::pytest

Note: On the Modal worker, the pytest command is run from the home directory, /root, which contains the tests folder, but the modal shell command will drop you at the top of the filesystem, /.

To run test:

cd root
pytest