Adds test class for checking query durations #233
python.yml
on: pull_request
Tests (pytest)
5m 12s
Linting (pylint)
1m 46s
Typing (mypy)
47s
Formatting (black; run ./bw-dev black to fix)
15s
Annotations
4 errors and 1 warning
Tests (pytest):
bookwyrm/tests/views/books/test_book.py#L82
BookViews.test_book_page
Exception: ('This looks like a slow query:', 0.013602515000002313, 'SELECT "bookwyrm_book"."id", "bookwyrm_book"."created_date", "bookwyrm_book"."updated_date", "bookwyrm_book"."remote_id", "bookwyrm_book"."origin_id", "bookwyrm_book"."openlibrary_key", "bookwyrm_book"."inventaire_id", "bookwyrm_book"."librarything_key", "bookwyrm_book"."goodreads_key", "bookwyrm_book"."bnf_id", "bookwyrm_book"."viaf", "bookwyrm_book"."wikidata", "bookwyrm_book"."asin", "bookwyrm_book"."aasin", "bookwyrm_book"."isfdb", "bookwyrm_book"."search_vector", "bookwyrm_book"."last_edited_by_id", "bookwyrm_book"."connector_id", "bookwyrm_book"."title", "bookwyrm_book"."sort_title", "bookwyrm_book"."subtitle", "bookwyrm_book"."description", "bookwyrm_book"."languages", "bookwyrm_book"."series", "bookwyrm_book"."series_number", "bookwyrm_book"."subjects", "bookwyrm_book"."subject_places", "bookwyrm_book"."cover", "bookwyrm_book"."preview_image", "bookwyrm_book"."first_published_date", "bookwyrm_book"."published_date", "bookwyrm_book"."first_published_date_precision", "bookwyrm_book"."published_date_precision", "bookwyrm_edition"."book_ptr_id", "bookwyrm_edition"."isbn_10", "bookwyrm_edition"."isbn_13", "bookwyrm_edition"."oclc_number", "bookwyrm_edition"."pages", "bookwyrm_edition"."physical_format", "bookwyrm_edition"."physical_format_detail", "bookwyrm_edition"."publishers", "bookwyrm_edition"."parent_work_id", "bookwyrm_edition"."edition_rank", T4."id", T4."created_date", T4."updated_date", T4."remote_id", T4."origin_id", T4."openlibrary_key", T4."inventaire_id", T4."librarything_key", T4."goodreads_key", T4."bnf_id", T4."viaf", T4."wikidata", T4."asin", T4."aasin", T4."isfdb", T4."search_vector", T4."last_edited_by_id", T4."connector_id", T4."title", T4."sort_title", T4."subtitle", T4."description", T4."languages", T4."series", T4."series_number", T4."subjects", T4."subject_places", T4."cover", T4."preview_image", T4."first_published_date", T4."published_date", T4."first_published_date_precision", T4."published_date_precision", "bookwyrm_work"."book_ptr_id", "bookwyrm_work"."lccn" FROM "bookwyrm_edition" INNER JOIN "bookwyrm_book" ON ("bookwyrm_edition"."book_ptr_id" = "bookwyrm_book"."id") LEFT OUTER JOIN "bookwyrm_work" ON ("bookwyrm_edition"."parent_work_id" = "bookwyrm_work"."book_ptr_id") LEFT OUTER JOIN "bookwyrm_book" T4 ON ("bookwyrm_work"."book_ptr_id" = T4."id") LEFT OUTER JOIN "bookwyrm_mergedbook" ON ("bookwyrm_book"."id" = "bookwyrm_mergedbook"."merged_into_id") WHERE ("bookwyrm_edition"."book_ptr_id" = %s OR "bookwyrm_edition"."parent_work_id" = %s OR "bookwyrm_mergedbook"."deleted_id" = %s) ORDER BY "bookwyrm_edition"."edition_rank" DESC LIMIT 1')
|
Tests (pytest):
bookwyrm/tests/views/books/test_book.py#L127
BookViews.test_book_page_statuses
Exception: ('This looks like a slow query:', 0.013183548000029077, 'SELECT "bookwyrm_book"."id", "bookwyrm_book"."created_date", "bookwyrm_book"."updated_date", "bookwyrm_book"."remote_id", "bookwyrm_book"."origin_id", "bookwyrm_book"."openlibrary_key", "bookwyrm_book"."inventaire_id", "bookwyrm_book"."librarything_key", "bookwyrm_book"."goodreads_key", "bookwyrm_book"."bnf_id", "bookwyrm_book"."viaf", "bookwyrm_book"."wikidata", "bookwyrm_book"."asin", "bookwyrm_book"."aasin", "bookwyrm_book"."isfdb", "bookwyrm_book"."search_vector", "bookwyrm_book"."last_edited_by_id", "bookwyrm_book"."connector_id", "bookwyrm_book"."title", "bookwyrm_book"."sort_title", "bookwyrm_book"."subtitle", "bookwyrm_book"."description", "bookwyrm_book"."languages", "bookwyrm_book"."series", "bookwyrm_book"."series_number", "bookwyrm_book"."subjects", "bookwyrm_book"."subject_places", "bookwyrm_book"."cover", "bookwyrm_book"."preview_image", "bookwyrm_book"."first_published_date", "bookwyrm_book"."published_date", "bookwyrm_book"."first_published_date_precision", "bookwyrm_book"."published_date_precision", "bookwyrm_edition"."book_ptr_id", "bookwyrm_edition"."isbn_10", "bookwyrm_edition"."isbn_13", "bookwyrm_edition"."oclc_number", "bookwyrm_edition"."pages", "bookwyrm_edition"."physical_format", "bookwyrm_edition"."physical_format_detail", "bookwyrm_edition"."publishers", "bookwyrm_edition"."parent_work_id", "bookwyrm_edition"."edition_rank", T4."id", T4."created_date", T4."updated_date", T4."remote_id", T4."origin_id", T4."openlibrary_key", T4."inventaire_id", T4."librarything_key", T4."goodreads_key", T4."bnf_id", T4."viaf", T4."wikidata", T4."asin", T4."aasin", T4."isfdb", T4."search_vector", T4."last_edited_by_id", T4."connector_id", T4."title", T4."sort_title", T4."subtitle", T4."description", T4."languages", T4."series", T4."series_number", T4."subjects", T4."subject_places", T4."cover", T4."preview_image", T4."first_published_date", T4."published_date", T4."first_published_date_precision", T4."published_date_precision", "bookwyrm_work"."book_ptr_id", "bookwyrm_work"."lccn" FROM "bookwyrm_edition" INNER JOIN "bookwyrm_book" ON ("bookwyrm_edition"."book_ptr_id" = "bookwyrm_book"."id") LEFT OUTER JOIN "bookwyrm_work" ON ("bookwyrm_edition"."parent_work_id" = "bookwyrm_work"."book_ptr_id") LEFT OUTER JOIN "bookwyrm_book" T4 ON ("bookwyrm_work"."book_ptr_id" = T4."id") LEFT OUTER JOIN "bookwyrm_mergedbook" ON ("bookwyrm_book"."id" = "bookwyrm_mergedbook"."merged_into_id") WHERE ("bookwyrm_edition"."book_ptr_id" = %s OR "bookwyrm_edition"."parent_work_id" = %s OR "bookwyrm_mergedbook"."deleted_id" = %s) ORDER BY "bookwyrm_edition"."edition_rank" DESC LIMIT 1')
|
Tests (pytest):
bookwyrm/tests/views/books/test_book.py#L866
BookViews.test_book_page_work_id
AssertionError: <<class 'bookwyrm.models.book.Edition'> key=None title='168'> != <<class 'bookwyrm.models.book.Edition'> key=None title='Example Edition'>
|
Tests (pytest)
Process completed with exit code 1.
|
Formatting (black; run ./bw-dev black to fix)
The `python-version` input is not set. The version of Python currently in `PATH` will be used.
|