2020-08-01 07:58:00 -07:00
..
2020-07-31 19:02:52 -07:00
2020-03-28 07:58:03 -07:00

Tests for osxphotos

Running Tests

Tests require pytest and pytest-mock: pip install pytest pip install pytest-mock

To run the tests, do the following from the main source folder: python -m pytest tests/

Running the tests this way allows the library to be tested without installing it.

Skipped Tests

A few tests will look for certain environment variables to determine if they should run.

Some of the export tests rely on photos in my local library and will look for OSXPHOTOS_TEST_EXPORT=1 to determine if they should run.

One test for locale does not run on GitHub's automated workflow and will look for OSXPHOTOS_TEST_LOCALE=1 to determine if it should be run. If you want to run this test, set the environment variable.

Attribution

These tests utilize a test Photos library. The test library is populated with photos from flickr and from my own photo library. All images used are licensed under Creative Commons 2.0 Attribution license.

Flickr images used from: