Closed gene-git closed 2 years ago
never mind - just needs PYTHONPATH=./src pytest tests and it works fine
That's a bit surprising, you should not have to deal with PYTHONPATH. Did install the project before running tests ? You could also use tox.
The release works fine - I build from git as well as released - then before building git HEAD (arch) package i run pytest in my git repo dir. Looks like the src dir moved is all - so pytest should be run there or set PYTHONPATH .. the actual package is fine.
So nothing wrong here just my package tool for the git version needed small tweak.
Hi When Running pytest on git main we get: Arch linux python 3.10.8
============================================= short test summary info ============================================= FAILED tests/test_compress_assets_plugin.py::test_compress[gzip-gz-None] - AttributeError: 'list' object has no ... FAILED tests/test_compress_assets_plugin.py::test_compress[zopfli-gz-zopfli.gzip] - AttributeError: 'list' objec... FAILED tests/test_compress_assets_plugin.py::test_compress[brotli-br-brotli] - AttributeError: 'list' object has... FAILED tests/test_compress_assets_plugin.py::test_failed_compress[zopfli-gz-zopfli.gzip] - AttributeError: 'list... FAILED tests/test_compress_assets_plugin.py::test_failed_compress[brotli-br-brotli] - AttributeError: 'list' obj... FAILED tests/test_compress_assets_plugin.py::test_failed_compress[__does_not_exist__-br-None] - AttributeError: ... FAILED tests/test_encrypt.py::test_encrypt - AttributeError: 'list' object has no attribute 'startswith' FAILED tests/test_extended_caching.py::test_save_cache - AttributeError: 'list' object has no attribute 'startsw... FAILED tests/test_extended_caching.py::test_restore_cache - AttributeError: 'list' object has no attribute 'star... FAILED tests/test_extended_caching.py::test_load_exif - AttributeError: 'list' object has no attribute 'startswith' FAILED tests/test_extended_caching.py::test_load_metadata_missing - AttributeError: 'list' object has no attribu... FAILED tests/test_gallery.py::test_album[dir1-album0] - AttributeError: 'list' object has no attribute 'startswith' FAILED tests/test_gallery.py::test_album[dir1/test1-album1] - AttributeError: 'list' object has no attribute 'st... FAILED tests/test_gallery.py::test_album[dir1/test2-album2] - AttributeError: 'list' object has no attribute 'st... FAILED tests/test_gallery.py::test_album[dir1/test3-album3] - AttributeError: 'list' object has no attribute 'st... FAILED tests/test_gallery.py::test_album[dir2-album4] - AttributeError: 'list' object has no attribute 'startswith' FAILED tests/test_gallery.py::test_album[accentu\xe9-album5] - AttributeError: 'list' object has no attribute 's... FAILED tests/test_gallery.py::test_album[video-album6] - AttributeError: 'list' object has no attribute 'startsw... FAILED tests/test_gallery.py::test_album[webp-album7] - AttributeError: 'list' object has no attribute 'startswith' FAILED tests/test_gallery.py::test_albums_sort - AttributeError: 'list' object has no attribute 'startswith' FAILED tests/test_gallery.py::test_medias_sort - AttributeError: 'list' object has no attribute 'startswith' FAILED tests/test_gallery.py::test_gallery - AttributeError: 'list' object has no attribute 'startswith' FAILED tests/test_gallery.py::test_gallery_max_img_pixels - AttributeError: 'list' object has no attribute 'star... FAILED tests/test_gallery.py::test_empty_dirs - AttributeError: 'list' object has no attribute 'startswith' FAILED tests/test_gallery.py::test_ignores - AttributeError: 'list' object has no attribute 'startswith' FAILED tests/test_plugins.py::test_plugins - AttributeError: 'list' object has no attribute 'startswith' FAILED tests/test_plugins.py::test_nonmedia_files - AttributeError: 'list' object has no attribute 'startswith' FAILED tests/test_plugins.py::test_titleregexp - AttributeError: 'list' object has no attribute 'startswith' FAILED tests/test_zip.py::test_zipped_correctly - AttributeError: 'list' object has no attribute 'startswith' FAILED tests/test_zip.py::test_no_archive - AttributeError: 'list' object has no attribute 'startswith' FAILED tests/test_zip.py::test_correct_filename - AttributeError: 'list' object has no attribute 'startswith' =================================== 31 failed, 55 passed, 39 warnings in 5.12s ====================================