Updated search_info test

This commit is contained in:
Rhet Turnbull 2022-11-15 20:49:28 -08:00
parent d0232284f0
commit f610d3cc65
2 changed files with 3 additions and 1 deletions

View File

@ -30,7 +30,7 @@ A couple of tests require interaction with Photos and configuring a specific tes
## Test Photo Libraries ## Test Photo Libraries
**Important**: The test code uses several test photo libraries created on various version of MacOS. If you need to inspect one of these or modify one for a test, make a copy of the library (for example, copy it to your ~/Pictures folder) then open the copy in Photos. Once done, copy the revised library back to the tests/ folder. If you do not do this, the Photos background process photoanalysisd will forever try to process the library resulting in updates to the database which will cause git to see changes to the file you didn't intend. I'm not aware of any way to disassociate photoanalysisd from the library once you've opened it in Photos. **Important**: The test code uses several test photo libraries created on various version of MacOS. If you need to inspect one of these or modify one for a test, make a copy of the library (for example, copy it to your ~/Pictures folder) then open the copy in Photos. Once done, copy the revised library back to the tests/ folder. If you do not do this, the Photos background process photoanalysisd will forever try to process the library resulting in updates to the database which will cause git to see changes to the file you didn't intend. I'm not aware of any way to disassociate photoanalysisd from the library once you've opened it in Photos.
Some of the "search_info" tests require data from my personal library on Catalina 10.15.7. The data is generated by running `tests/generate_search_info_test_data.py` Some of the "search_info" tests require data from my personal library on Catalina 10.15.7. The data is generated by running `python3 tests/generate_search_info_test_data.py >tests/search_info_test_data_10_15_7.json`
## Attribution ## ## Attribution ##
These tests utilize a test Photos library. The test library is populated with photos from [flickr](https://www.flickr.com) and from my own photo library. All images used are licensed under Creative Commons 2.0 Attribution [license](https://creativecommons.org/licenses/by/2.0/). These tests utilize a test Photos library. The test library is populated with photos from [flickr](https://www.flickr.com) and from my own photo library. All images used are licensed under Creative Commons 2.0 Attribution [license](https://creativecommons.org/licenses/by/2.0/).

View File

@ -1,5 +1,7 @@
""" test SearchInfo class """ """ test SearchInfo class """
# Note: Run tests/generate_search_info_test_data.py to generate the UUID_SEARCH_INFO dict
import json import json
import os import os