flakytest.dev anze3db fedidevs
Profiles / #2

Failed Run of Oct 18, 15:53

CI github-actions:test · 623aa3e main dirty · pass/fail report
Some tests got too few samples to explain their time. Rerun with pytest --flakytest-profile --flakytest-rate 1000.
Wall time
52.77 s
4 workers
Test time
2m 32s
sum of test durations
Tests
301
300 passed · 1 failed
Profiler
py-spy
500 Hz · 59,375 samples · Python 3.14.8 · flakytest 2026.0b1
Peak memory
673 MB
4 workers together

Where the time goes

Test time by category
  • Password hashing47.43 s
  • Migrations39.98 s
  • Libraries38.24 s
  • Database12.22 s
  • Mocking3.46 s
  • DB schema3.19 s
  • Imports3.10 s
  • Templates2.16 s
  • pytest915 ms
  • Factories593 ms
  • Unsampled358 ms
  • App code146 ms
  • Deep copies68 ms
  • Waiting46 ms
  • Test code35 ms
  • Network34 ms
  • Cache27 ms
  • Logging16 ms
  • Serialization11 ms

Session timeline

Other
3.49 s
Tests
2m 34s
Startup
7.27 s
Collection
3.79 s
Between tests
1.94 s
Session teardown
9 ms
Test phases
Setup 43.05 s Call 1m 48s Teardown 1.16 s

Fix next

Ranked by the time each fix saves per run
1

Use plain static file storage in tests

Static file storage/manifest handling costs 45.3s.

High App code
45.34 s per run
Fix: In test settings use STORAGES["staticfiles"] = {"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"} so templates don't need a manifest.
Details

Where:

  • starter_packs/tests.py:840 test_api_formats · 1.24 s
  • confs/tests.py:152 _assert_no_naive_warning · 1.15 s
  • accounts/tests.py:550 assert_noindex · 1.07 s
  • accounts/tests.py:555 assert_indexable · 998 ms
  • starter_packs/tests.py:780 test_order_by · 974 ms
  • starter_packs/tests.py:820 test_sort_select_avoids_inline_js · 900 ms
  • accounts/views.py:428 index · 826 ms
  • accounts/tests.py:536 test_developers_on_mastodon · 636 ms
  • confs/tests.py:884 test_conference_with_pacific_with_date · 625 ms
  • starter_packs/tests.py:197 test_not_owned_starter_pack · 556 ms

Most affected tests:

  • starter_packs/tests.py::TestShareStarterPack::test_sort_select_avoids_inline_js
  • confs/tests.py::TestConferencePage::test_conference_with_pacific_with_date
  • accounts/tests.py::TestStaticPages::test_developers_on_mastodon
  • confs/tests.py::TestMigratedLegacyConferences::test_djangoconafrica_page
  • starter_packs/tests.py::TestShareStarterPack::test_non_discoverable_accounts
  • starter_packs/tests.py::TestStarterPacks::test_index_page_language_filter
  • starter_packs/tests.py::TestEditStarterPack::test_not_owned_starter_pack
  • accounts/tests.py::TestAccountIndexRobots::test_single_facet_is_indexable
2

Use a fast password hasher in tests

47.4s (31% of test time) is spent hashing passwords. Slow hashing protects real passwords; in tests it only burns CPU.

High Password hashing
45.06 s per run
Fix: In your test settings set PASSWORD_HASHERS = ["django.contrib.auth.hashers.MD5PasswordHasher"] (currently PBKDF2PasswordHasher). Also replace self.client.login(username=…, password=…) with self.client.force_login(user), which skips password checks entirely: fedidevs/tests.py:63
Details

Only change the hasher in test settings. Tests that assert on a specific hash format need updating.

Where:

  • confs/tests.py:1044 setUp · 8.94 s
  • confs/tests.py:1175 setUp · 6.35 s
  • confs/tests.py:1176 setUp · 5.77 s
  • confs/tests.py:1371 setUp · 5.75 s
  • confs/tests.py:1177 setUp · 5.45 s
  • confs/tests.py:1372 setUp · 5.35 s
  • confs/tests.py:1316 setUp · 3.65 s
  • confs/tests.py:1317 setUp · 2.96 s
  • fedidevs/tests.py:62 test_authenticated_html_is_private_and_keeps_csrf_header · 1.17 s
  • fedidevs/tests.py:63 test_authenticated_html_is_private_and_keeps_csrf_header · 794 ms

Most affected tests:

  • confs/tests.py::TestEditConference::test_owner_can_edit
  • confs/tests.py::TestEditConference::test_other_user_forbidden_on_approved_conference
  • confs/tests.py::TestEditConference::test_edit_does_not_change_slug
  • confs/tests.py::TestEditConference::test_other_user_forbidden
  • confs/tests.py::TestApproveConference::test_anonymous_sees_pending_banner_without_button
  • confs/tests.py::TestApproveConference::test_staff_sees_approve_button_on_detail
  • confs/tests.py::TestEditConference::test_owner_can_edit_after_approval
  • confs/tests.py::TestConferenceApprovalVisibility::test_other_user_does_not_see_pending

Documentation

3

Stop re-running migrations on every test run

Migrations take 40.0s per run, before the first test can start.

High Migrations
35.98 s per run
Fix: Run with --reuse-db (add it to addopts in pytest.ini/pyproject) so the test database survives between runs; pass --create-db when migrations change. If no test depends on data migrations, --nomigrations builds the schema straight from the models, which is faster still.
Details

CI should still build the database from scratch (no --reuse-db) so broken migrations are caught.

Where:

  • confs/tests.py:432 _migrate · 2.48 s
  • confs/migrations/0031_seed_conference_tags.py:14 seed_conference_tags · 934 ms
  • confs/migrations/0033_remove_legacy_conference_tables.py:388 _get_or_create_conference · 177 ms
  • confs/tests.py:430 _migrate · 172 ms
  • confs/tests.py:412 _leaf_targets · 170 ms
  • confs/migrations/0033_remove_legacy_conference_tables.py:214 _pk_batches · 157 ms
  • confs/tests.py:431 _migrate · 145 ms
  • confs/migrations/0033_remove_legacy_conference_tables.py:328 _refresh_account_counts · 77 ms
  • confs/migrations/0033_remove_legacy_conference_tables.py:398 migrate_legacy_pair · 60 ms
  • confs/migrations/0033_remove_legacy_conference_tables.py:360 _attach_lookups_and_tags · 58 ms

Most affected tests:

  • confs/tests.py::TestConferencePage::test_conference_with_utc_with_date_no_posts
  • accounts/tests.py::TestAccountIndexRobots::test_single_facet_is_indexable
  • accounts/tests.py::TestSelectedInstance::test_invalid_selected_instance
  • confs/tests.py::TestMigratedLegacyConferences::test_djangoconus_old_url_redirects
  • confs/tests.py::TestLegacyConferenceDataMigration::test_copies_overlapping_legacy_rows_without_clobbering_existing_data
  • confs/tests.py::TestLegacyConferenceDataMigration::test_drops_legacy_tables_when_uniques_are_mysql_style_indexes

Documentation

4

Create shared test data in setUpTestData instead of setUp

setUp() runs before every test and takes 45.8s in total (password hashing 45.5s, db 271ms, factories 20ms) in 7 classes: TestPostAnnouncements (6 tests), TestFollowStarterPack (3 tests), TestConferenceApprovalVisibility (5 tests), TestApproveConference (6 tests).

High Database
32.04 s per run
Fix: Move object creation that tests only read from setUp() into `@classmethod def setUpTestData(cls)`: it runs once per class and each test still sees the original rows (TestCase rolls back to a savepoint).
Details

Since Django 3.2 attributes assigned in setUpTestData are deep-copied per test, so in-memory changes don't leak between tests. Keep objects a test modifies in the database (or re-fetches) as before.

Where:

  • confs/tests.py:1044 setUp · 8.97 s
  • confs/tests.py:1175 setUp · 6.37 s
  • confs/tests.py:1176 setUp · 5.79 s
  • confs/tests.py:1371 setUp · 5.76 s
  • confs/tests.py:1177 setUp · 5.46 s
  • confs/tests.py:1372 setUp · 5.36 s
  • confs/tests.py:1316 setUp · 3.67 s
  • confs/tests.py:1317 setUp · 2.96 s
  • confs/tests.py:1295 setUp · 635 ms
  • confs/tests.py:1296 setUp · 614 ms

Most affected tests:

  • confs/tests.py::TestEditConference::test_owner_can_edit
  • confs/tests.py::TestEditConference::test_other_user_forbidden_on_approved_conference
  • confs/tests.py::TestEditConference::test_edit_does_not_change_slug
  • confs/tests.py::TestEditConference::test_other_user_forbidden
  • confs/tests.py::TestApproveConference::test_anonymous_sees_pending_banner_without_button
  • confs/tests.py::TestApproveConference::test_staff_sees_approve_button_on_detail
  • confs/tests.py::TestEditConference::test_owner_can_edit_after_approval
  • confs/tests.py::TestConferenceApprovalVisibility::test_other_user_does_not_see_pending

Documentation

5

Repeated queries (N+1) in the code under test

10 tests run the same query 10+ times, e.g. 45x in test_single_facet_is_indexable. N+1 queries slow the tests and production alike.

Medium Database
13.40 s per run
Fix: Django: fetch related rows in one query with select_related() for foreign keys and prefetch_related() for reverse/many-to-many relations, then lock the count in with assertNumQueries (or pytest-django's django_assert_num_queries).
Details

This changes application code, so it speeds up production too; the tests stay as they are.

  • 45x in test_single_facet_is_indexable: SELECT "confs_conferencetag"."id", "confs_conferencetag"."name", "confs_conferencetag"."slug", "confs_conferencetag"."icon" FROM "confs_conferencetag" WHERE "confs_conferencetag"."slug" = %s LIMIT ? FOR UPDATE
  • 45x in test_invalid_selected_instance: SELECT "confs_conferencetag"."id", "confs_conferencetag"."name", "confs_conferencetag"."slug", "confs_conferencetag"."icon" FROM "confs_conferencetag" WHERE "confs_conferencetag"."slug" = %s LIMIT ? FOR UPDATE
  • 45x in test_djangoconus_old_url_redirects: SELECT "confs_conferencetag"."id", "confs_conferencetag"."name", "confs_conferencetag"."slug", "confs_conferencetag"."icon" FROM "confs_conferencetag" WHERE "confs_conferencetag"."slug" = %s LIMIT ? FOR UPDATE
  • 45x in test_conference_with_utc_with_date_no_posts: SELECT "confs_conferencetag"."id", "confs_conferencetag"."name", "confs_conferencetag"."slug", "confs_conferencetag"."icon" FROM "confs_conferencetag" WHERE "confs_conferencetag"."slug" = %s LIMIT ? FOR UPDATE
  • 44x in test_store_daily_stats: SELECT COUNT(*) AS "__count" FROM "accounts_accountlookup" WHERE UPPER("accounts_accountlookup"."language"::text) LIKE UPPER(%s)

Most affected tests:

  • accounts/tests.py::TestAccountIndexRobots::test_single_facet_is_indexable
  • accounts/tests.py::TestSelectedInstance::test_invalid_selected_instance
  • confs/tests.py::TestMigratedLegacyConferences::test_djangoconus_old_url_redirects
  • confs/tests.py::TestConferencePage::test_conference_with_utc_with_date_no_posts
  • stats/tests.py::TestStats::test_store_daily_stats
  • stats/tests.py::TestStats::test_store_daily_stats_with_accounts
  • stats/tests.py::TestStats::test_posts_from_yesterday_are_updated
  • accounts/tests.py::TestInstanceIndexingBridgy::test_follows_redirect_and_coerces_null_version

Documentation

6

Make the test database server skip durability work

Tests spend 55.4s (36%) in the database. Test databases don't need to survive a crash, so the server can skip flushing to disk.

Medium Database
11.08 s per run
Fix: For a PostgreSQL test server (Docker/CI service) start it with -c fsync=off -c synchronous_commit=off -c full_page_writes=off, and put its data directory on tmpfs; for MySQL use --innodb-flush-log-at-trx-commit=0 --skip-log-bin. Never on a server with data you need.
Details

Only affects crash safety of the throwaway test server; query behaviour is identical.

Where:

  • confs/tests.py:432 _migrate · 2.48 s
  • starter_packs/tests.py:396 test_toggle_after_limit · 1.11 s
  • confs/migrations/0031_seed_conference_tags.py:14 seed_conference_tags · 934 ms
  • stats/models.py:20 store_daily_stats · 282 ms
  • stats/models.py:12 store_daily_stats · 232 ms
  • confs/migrations/0033_remove_legacy_conference_tables.py:388 _get_or_create_conference · 177 ms
  • confs/tests.py:430 _migrate · 172 ms
  • confs/tests.py:412 _leaf_targets · 170 ms
  • starter_packs/views.py:729 share_starter_pack · 167 ms
  • confs/migrations/0033_remove_legacy_conference_tables.py:214 _pk_batches · 157 ms

Most affected tests:

  • accounts/tests.py::TestSelectedInstance::test_invalid_selected_instance
  • confs/tests.py::TestConferencePage::test_conference_with_utc_with_date_no_posts
  • accounts/tests.py::TestAccountIndexRobots::test_single_facet_is_indexable
  • confs/tests.py::TestMigratedLegacyConferences::test_djangoconus_old_url_redirects
  • confs/tests.py::TestLegacyConferenceDataMigration::test_copies_overlapping_legacy_rows_without_clobbering_existing_data
  • confs/tests.py::TestLegacyConferenceDataMigration::test_drops_legacy_tables_when_uniques_are_mysql_style_indexes
  • starter_packs/tests.py::TestToggleStarterPackAccount::test_toggle_after_limit
  • mastodon_auth/tests.py::RegisterAppTests::test_raises_with_status_code_on_429

Documentation

7

Disable django-debug-toolbar in tests

django-debug-toolbar is installed in the test settings and costs 8.7s.

Medium App code
8.72 s per run
Fix: Only add debug_toolbar to INSTALLED_APPS and MIDDLEWARE when not testing (e.g. `if DEBUG and not TESTING:`).
Details

Where:

  • accounts/views.py:428 index · 826 ms
  • confs/views.py:299 _conference_detail · 492 ms
  • starter_packs/views.py:865 share_starter_pack · 382 ms
  • confs/views.py:512 create_conference · 192 ms
  • starter_packs/views.py:188 starter_packs · 185 ms
  • starter_packs/views.py:729 share_starter_pack · 170 ms
  • starter_packs/views.py:858 share_starter_pack · 145 ms
  • accounts/views.py:28 __init__ · 145 ms
  • confs/views.py:131 conferences · 137 ms
  • accounts/templatetags/account_extras.py:27 render_language_emojis · 124 ms

Most affected tests:

  • accounts/tests.py::TestSelectedInstance::test_invalid_selected_instance
  • confs/tests.py::TestMigratedLegacyConferences::test_dotnetconf_page
  • confs/tests.py::TestConferencePage::test_conference_with_utc_with_date_no_posts
  • accounts/tests.py::TestAccountIndexRobots::test_single_facet_is_indexable
  • fedidevs/tests.py::TestAnonymousCacheAndCsrf::test_anonymous_forms_work_after_csrf_bootstrap
  • accounts/tests.py::TestSelectedInstance::test_selected_instance_through_session
  • fedidevs/tests.py::TestAnonymousCacheAndCsrf::test_other_pages_keep_unknown_query_params
  • accounts/tests.py::TestSelectedInstance::test_selected_instance

Documentation

8

pytest takes a long time before the first test runs

Startup takes 7.3s and collection 3.8s on every run, even when you only run one test.

Low Imports
4.42 s per run
Fix: Set testpaths and norecursedirs (node_modules, .venv, build, docs) so pytest doesn't walk unrelated directories; move heavy imports out of module level in test files and conftest.py into fixtures; check `python -X importtime -m pytest --collect-only -q` for the slowest imports.
Details
  • mastodon_auth/tests.py (1.0s)
  • starter_packs/tests.py (207ms)
  • accounts/tests.py (52ms)
  • confs/tests.py (29ms)
  • stats/tests.py (9ms)
  • fedidevs/settings.py (1.9s)
  • starter_packs/admin.py (1.3s)
  • debug_toolbar/panels/sql/__init__.py (885ms)

Documentation

9

Modules are imported while tests run

3.1s of test time is spent importing modules: whichever test imports a heavy module first pays for it, which makes that test look slow (and varies with test order).

Low Imports
931 ms per run
Fix: Find what is imported at the lines listed. Import heavy modules at the top of the test module or in conftest.py so the cost shows up once at collection, or avoid importing them in tests at all (e.g. stub the heavy dependency).
Details

Where:

  • confs/views.py:299 _conference_detail · 152 ms
  • mastodon_auth/forms.py:27 clean_instance · 120 ms
  • confs/og_images.py:246 render_conference_og_image · 118 ms
  • confs/tests.py:431 _migrate · 103 ms
  • accounts/management/commands/indexer.py:81 handle · 91 ms
  • confs/tests.py:875 test_conference_with_utc_with_date_no_posts · 81 ms
  • confs/tests.py:412 _leaf_targets · 73 ms
  • accounts/views.py:428 index · 65 ms
  • starter_packs/splash_images.py:192 is_character_in_font · 39 ms
  • accounts/tests.py:555 assert_indexable · 34 ms

Most affected tests:

  • accounts/tests.py::TestSelectedInstance::test_invalid_selected_instance
  • accounts/tests.py::TestAccountIndexRobots::test_single_facet_is_indexable
  • confs/tests.py::TestMigratedLegacyConferences::test_djangoconus_old_url_redirects
  • confs/tests.py::TestConferencePage::test_conference_with_utc_with_date_no_posts
  • confs/tests.py::TestConferenceOgImage::test_management_command_renders_missing_and_skips_current
  • confs/tests.py::TestLegacyConferenceDataMigration::test_drops_legacy_tables_when_uniques_are_mysql_style_indexes
  • mastodon_auth/tests.py::MastodonLoginFormTests::test_cleans_instance_to_ascii_hostname
  • confs/tests.py::TestLegacyConferenceDataMigration::test_copies_overlapping_legacy_rows_without_clobbering_existing_data

Tests

201–301 of 301, slowest first · click a column to sort this page
Test Outcome Duration Setup Call Teardown Mostly Queries
starter_packs/tests.py::TestStarterPacks::test_language_filter_only_lists_used_languages
passed 163 ms 1 ms 161 ms 0.83 ms Libraries 15
starter_packs/tests.py::TestPinAccountInStarterPack::test_pin_limit
passed 160 ms 1 ms 156 ms 2 ms Database 47
20 repeated
confs/tests.py::TestMigratedLegacyConferences::test_djangoconus_date_redirects
passed 157 ms 1.00 ms 155 ms 1 ms Libraries 5
accounts/tests.py::TestAccountIndexRobots::test_paginated_single_facet_is_noindex
passed 157 ms 1 ms 155 ms 0.31 ms Libraries 8
mastodon_auth/tests.py::MastodonLoginFormTests::test_cleans_instance_to_ascii_hostname
passed 155 ms 22 ms 133 ms 0.28 ms Imports 5
mastodon_auth/tests.py::RedirectToLocalViewTests::test_valid_query_redirects_unauthenticated_users_to_target
passed 154 ms 1 ms 150 ms 3 ms Libraries 5
accounts/tests.py::TestAccountIndexRobots::test_two_facets_are_noindex
passed 144 ms 2 ms 142 ms 0.58 ms Libraries 8
starter_packs/tests.py::TestRemoteFollowStarterPack::test_share_page_hides_remote_follow_form_when_logged_in
passed 130 ms 1 ms 128 ms 0.32 ms Libraries 33
starter_packs/tests.py::TestRemoteFollowStarterPack::test_share_page_shows_remote_follow_form_when_logged_out
passed 124 ms 1 ms 118 ms 5 ms Libraries 11
starter_packs/tests.py::TestPinAccountInStarterPack::test_unpinned_pack_orders_by_followers
passed 122 ms 2 ms 116 ms 4 ms Libraries 12
starter_packs/tests.py::TestPinAccountInStarterPack::test_pinned_account_listed_first_for_everyone
passed 119 ms 1 ms 117 ms 0.35 ms Libraries 13
starter_packs/tests.py::TestEditStarterPack::test_edit_starter_packs
passed 116 ms 1 ms 115 ms 0.35 ms Libraries 25
starter_packs/tests.py::TestPinAccountInStarterPack::test_removing_account_swaps_pin_button_to_disabled
passed 115 ms 4 ms 111 ms 0.36 ms Libraries 35
posts/tests.py::TestSubscribePages::test_subscribe_uses_tailwind_layout
passed 115 ms 4 ms 109 ms 2 ms Libraries 6
starter_packs/tests.py::TestPinAccountInStarterPack::test_toggle_pin_and_unpin
passed 114 ms 1 ms 113 ms 0.36 ms Libraries 33
3 repeated
starter_packs/tests.py::TestPinAccountInStarterPack::test_stale_pin_toggle_returns_disabled_button
passed 114 ms 1 ms 112 ms 0.38 ms Libraries 26
starter_packs/tests.py::TestFollowBg::test_continues_after_other_errors
passed 113 ms 84 ms 28 ms 0.30 ms Database 25
12 repeated
starter_packs/tests.py::TestDeleteStarterPack::test_delete_confirmation
passed 112 ms 1 ms 111 ms 0.32 ms Libraries 25
starter_packs/tests.py::TestEditStarterPack::test_not_logged_in
passed 109 ms 1 ms 108 ms 0.34 ms Libraries 7
accounts/tests.py::TestParseDiscoverable::test_top_level_false_wins_over_nested
passed 108 ms 1 ms 0.22 ms 107 ms DB schema 1
fedidevs/tests.py::TestAccountIndexQueryParams::test_unknown_root_param_is_301ed
passed 103 ms 1 ms 102 ms 0.45 ms Libraries –
announcements/tests.py::TestPostAnnouncements::test_does_not_repost_already_posted
passed 101 ms 42 ms 59 ms 0.33 ms Database 10
starter_packs/tests.py::TestDeleteStarterPack::test_not_owned_starter_pack
passed 100 ms 2 ms 93 ms 5 ms Libraries 24
starter_packs/tests.py::TestShareStarterPack::test_api_activitypub_leaves_out_accounts_without_activitypub_id
passed 100 ms 1 ms 98 ms 0.35 ms Libraries 14
confs/tests.py::TestSyncAnnouncements::test_creates_and_links_start_and_end_announcements
passed 99 ms 15 ms 84 ms 0.31 ms Database 13
starter_packs/tests.py::TestPinAccountInStarterPack::test_toggle_pin_requires_ownership
passed 98 ms 1 ms 97 ms 0.35 ms Libraries 25
starter_packs/tests.py::TestDeleteStarterPack::test_not_logged_in
passed 92 ms 2 ms 89 ms 0.31 ms Libraries 7
fedidevs/tests.py::TestAccountIndexQueryParams::test_language_index_strips_unknown_params
passed 91 ms 1 ms 89 ms 0.31 ms Libraries –
stats/tests.py::TestStarterPackStats::test_starter_pack_stats
passed 83 ms 27 ms 51 ms 5 ms Database 25
15 repeated
starter_packs/tests.py::TestRemoteFollowStarterPack::test_redirects_to_subscribe_url
passed 79 ms 1 ms 77 ms 0.32 ms Mocking 6
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_creates_account_when_neither_url_nor_pair_match
passed 62 ms 25 ms 37 ms 0.36 ms Database 12
confs/tests.py::TestSyncAnnouncements::test_leaves_already_posted_announcements_untouched
passed 54 ms 1 ms 52 ms 0.34 ms Database 17
3 repeated
confs/tests.py::TestSyncAnnouncements::test_variation_is_stable_across_resyncs
passed 49 ms 2 ms 45 ms 2 ms Database 17
4 repeated
confs/tests.py::TestSyncAnnouncements::test_is_idempotent_and_refreshes_unposted_content
passed 46 ms 1 ms 45 ms 0.34 ms Database 18
4 repeated
confs/tests.py::TestSyncAnnouncements::test_uses_one_of_the_message_variations
passed 42 ms 4 ms 38 ms 0.32 ms Database 13
stats/tests.py::TestStats::test_all_daily_lang_stats
passed 39 ms 30 ms 9 ms 0.34 ms Database 5
confs/tests.py::TestSyncAnnouncements::test_post_at_uses_conference_timezone
passed 38 ms 1 ms 37 ms 0.30 ms Database 12
announcements/tests.py::TestPostAnnouncements::test_dry_run_is_the_default
passed 37 ms 3 ms 33 ms 0.31 ms Database 9
starter_packs/tests.py::TestGetSubscribeUrl::test_no_subscribe_link
passed 36 ms 30 ms 6 ms 0.24 ms Database 5
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_match_existing_post_by_post_id_and_account
passed 36 ms 5 ms 30 ms 0.33 ms Database 10
confs/tests.py::TestSyncAnnouncements::test_skips_past_and_archived_conferences
passed 35 ms 9 ms 26 ms 0.32 ms Database 9
announcements/tests.py::TestPostAnnouncements::test_skips_when_token_missing
passed 33 ms 4 ms 28 ms 1 ms Database 8
starter_packs/tests.py::TestFollowBg::test_stops_after_unauthorized
passed 33 ms 6 ms 20 ms 7 ms Database 10
confs/tests.py::TestPostsAfterDatetime::test_aware_start_of_day_in_conference_timezone
passed 33 ms 18 ms 14 ms 0.37 ms Unsampled 6
starter_packs/tests.py::TestParseHandle::test_invalid_handles
passed 32 ms 23 ms 9 ms 0.31 ms Database 5
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_resolve_posts_does_not_scan_or_join_accounts_by_url
passed 31 ms 7 ms 21 ms 3 ms Database 9
confs/tests.py::TestMigratedLegacyConferences::test_account_kwargs_from_json
passed 28 ms 20 ms 8 ms 0.34 ms Database 5
confs/tests.py::TestSyncAnnouncements::test_skips_pending_conferences
passed 26 ms 6 ms 20 ms 0.37 ms Database 8
accounts/tests.py::TestCrawlerGotosocial::test_auth_gated_directory_caches_unknown_and_skips_misskey_probe
passed 25 ms 1 ms 23 ms 0.27 ms Waiting –
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_dedupes_same_url_and_same_pair_in_one_batch
passed 24 ms 6 ms 17 ms 0.76 ms Database 11
confs/tests.py::TestConferenceOgImage::test_signature_changes_with_visible_content
passed 22 ms 1 ms 16 ms 4 ms Database 6
announcements/tests.py::TestPostAnnouncements::test_posts_only_due_announcements
passed 21 ms 3 ms 18 ms 0.30 ms Database 11
3 repeated
announcements/tests.py::TestPostAnnouncements::test_records_error_and_leaves_row_unposted
passed 21 ms 1 ms 19 ms 0.29 ms Database 10
starter_packs/tests.py::TestParseHandle::test_valid_handles
passed 18 ms 2 ms 14 ms 2 ms Imports 5
accounts/tests.py::TestCrawlerGotosocial::test_open_directory_on_non_gotosocial_leaves_uri_missing
passed 18 ms 1 ms 17 ms 0.29 ms pytest –
starter_packs/tests.py::TestGetSubscribeUrl::test_webfinger_invalid_json
passed 15 ms 1 ms 14 ms 0.25 ms Database 5
announcements/tests.py::TestPostAnnouncements::test_respects_visibility
passed 15 ms 1 ms 14 ms 0.28 ms Database 10
mastodon_auth/tests.py::MastodonLoginFormTests::test_rejects_invalid_idna_hostname
passed 15 ms 5 ms 10 ms 0.81 ms pytest 5
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_match_existing_account_by_id_and_instance_when_url_differs
passed 15 ms 3 ms 12 ms 0.33 ms Database 9
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_match_existing_account_by_url_when_ids_differ
passed 15 ms 2 ms 12 ms 0.32 ms Database 8
confs/tests.py::TestMigratedLegacyConferences::test_legacy_tables_were_dropped
passed 15 ms 0.94 ms 13 ms 0.27 ms Database 6
starter_packs/tests.py::TestGetSubscribeUrl::test_returns_filled_template
passed 14 ms 5 ms 9 ms 0.25 ms Database 5
confs/tests.py::TestPostsAfterDatetime::test_none_when_unset
passed 13 ms 4 ms 8 ms 0.86 ms Unsampled 6
starter_packs/tests.py::TestGetSubscribeUrl::test_webfinger_network_error
passed 12 ms 5 ms 5 ms 2 ms Database 5
starter_packs/tests.py::TestGetSubscribeUrl::test_webfinger_404
passed 11 ms 3 ms 7 ms 0.24 ms Database 5
starter_packs/tests.py::TestGetSubscribeUrl::test_rejects_template_without_uri_placeholder
passed 9 ms 1 ms 8 ms 0.27 ms Database 5
accounts/tests.py::TestParseDiscoverable::test_mastodon_top_level
passed 9 ms 9 ms 0.26 ms 0.28 ms pytest –
mastodon_auth/tests.py::IsValidRedirectQueryTests::test_accepts_http_and_https_urls_with_host
passed 9 ms 5 ms 0.97 ms 3 ms pytest –
starter_packs/tests.py::TestGetSubscribeUrl::test_rejects_non_https_template
passed 8 ms 1 ms 7 ms 0.27 ms Database 5
accounts/tests.py::TestActivityPubActor::test_actor_to_account_defaults_bot_and_locked
passed 7 ms 3 ms 4 ms 0.23 ms pytest –
accounts/tests.py::TestCrawlerGotosocial::test_open_directory_resolves_missing_actor_uri_via_webfinger
passed 7 ms 1 ms 5 ms 0.53 ms Waiting –
confs/tests.py::TestMigratedLegacyConferences::test_legacy_conferences_were_seeded
passed 7 ms 1 ms 6 ms 0.25 ms Database 6
accounts/tests.py::TestMisskeyApi::test_is_misskey_family
passed 7 ms 0.89 ms 6 ms 0.27 ms pytest –
accounts/tests.py::TestMisskeyAdapter::test_missing_avatar_and_banner_are_empty_strings
passed 6 ms 6 ms 0.26 ms 0.20 ms pytest –
mastodon_auth/tests.py::ParseDtTests::test_aware_datetime_object_passes_through
passed 6 ms 1 ms 0.25 ms 4 ms pytest –
accounts/tests.py::TestActivityPubActor::test_actor_to_account_defaults_maps_bridged_actor
passed 6 ms 5 ms 0.34 ms 0.22 ms Libraries –
mastodon_auth/tests.py::IsValidRedirectQueryTests::test_rejects_malformed_or_incomplete_urls
passed 5 ms 2 ms 3 ms 0.33 ms Unsampled –
mastodon_auth/tests.py::AuthorizeUrlTests::test_force_login_included_only_when_requested
passed 5 ms 1 ms 3 ms 0.30 ms Libraries –
accounts/tests.py::TestParseDiscoverable::test_mastodon_null_or_absent
passed 5 ms 2 ms 3 ms 0.23 ms Libraries –
accounts/tests.py::TestJobTimeLimits::test_daily_job_has_no_time_limit
passed 4 ms 4 ms 0.47 ms 0.23 ms Imports –
accounts/tests.py::TestMisskeyAdapter::test_falls_back_to_constructed_url_when_local
passed 3 ms 3 ms 0.33 ms 0.31 ms pytest –
mastodon_auth/tests.py::RegisterAppTests::test_raises_when_credentials_missing_from_body
passed 3 ms 1 ms 2 ms 0.26 ms Mocking –
accounts/tests.py::TestMisskeyAdapter::test_emojis_dict_converted_to_list
passed 3 ms 3 ms 0.40 ms 0.27 ms pytest –
accounts/tests.py::TestJobTimeLimits::test_hourly_job_keeps_the_default_time_limit
passed 3 ms 2 ms 0.28 ms 0.33 ms Unsampled –
mastodon_auth/tests.py::RegisterAppTests::test_raises_with_none_status_on_network_error
passed 2 ms 1 ms 0.56 ms 0.27 ms pytest –
mastodon_auth/tests.py::ParseDtTests::test_none
passed 2 ms 1 ms 0.23 ms 0.87 ms Unsampled –
mastodon_auth/tests.py::ParseDtTests::test_date_object_becomes_aware_midnight
passed 2 ms 1 ms 0.56 ms 0.24 ms Unsampled –
mastodon_auth/tests.py::AuthorizeUrlTests::test_builds_code_flow_url_without_junk_params
passed 2 ms 1 ms 0.31 ms 0.23 ms pytest –
accounts/tests.py::TestMisskeyApi::test_build_miauth_url
passed 2 ms 1 ms 0.30 ms 0.25 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_maps_core_fields
passed 2 ms 1 ms 0.35 ms 0.22 ms Unsampled –
accounts/tests.py::TestParseDiscoverable::test_pleroma_nested_in_source
passed 2 ms 1 ms 0.35 ms 0.23 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_missing_required_fields_returns_none
passed 2 ms 1 ms 0.27 ms 0.22 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_emojis_missing_returns_empty_list
passed 2 ms 1 ms 0.29 ms 0.22 ms Unsampled –
mastodon_auth/tests.py::AuthorizeUrlTests::test_is_pleroma
passed 2 ms 1 ms 0.24 ms 0.30 ms Unsampled –
mastodon_auth/tests.py::ParseDtTests::test_naive_datetime_object_is_made_aware
passed 2 ms 0.97 ms 0.30 ms 0.27 ms Unsampled –
mastodon_auth/tests.py::ParseDtTests::test_date_only_string_becomes_aware_midnight
passed 2 ms 1 ms 0.27 ms 0.22 ms pytest –
accounts/tests.py::TestActivityPubActor::test_media_and_profile_url_variants
passed 1 ms 0.91 ms 0.29 ms 0.26 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_remote_user_acct_includes_host
passed 1 ms 0.91 ms 0.26 ms 0.27 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_missing_display_name_falls_back_to_username
passed 1 ms 0.95 ms 0.28 ms 0.20 ms Unsampled –
mastodon_auth/tests.py::ParseDtTests::test_iso_string_with_offset
passed 1 ms 0.96 ms 0.25 ms 0.22 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_noindex_flips_discoverable
passed 1 ms 0.89 ms 0.27 ms 0.20 ms Unsampled –

Slowest fixtures

Exact setup time across the session
Fixture Scope Calls Total Max
_django_setup_unittest class 75 39.77 s 10.17 s
django_db_setup session 4 39.69 s 10.17 s
_unittest_setUpClass_fixture_TestSelectedInstance class 1 290 ms 290 ms
_unittest_setUpClass_fixture_TestShareStarterPack class 2 208 ms 118 ms
_unittest_setUpClass_fixture_TestEditStarterPackAccounts class 2 206 ms 157 ms
_unittest_setUpClass_fixture_TestConferencePage class 2 192 ms 151 ms
_unittest_setUpClass_fixture_TestPinAccountInStarterPack class 2 153 ms 78 ms
_unittest_setUpClass_fixture_TestOwnerManagement class 2 122 ms 64 ms
_unittest_setUpClass_fixture_TestFollowStarterPack class 2 108 ms 60 ms
_unittest_setUpClass_fixture_TestFollowBg class 1 77 ms 77 ms
_unittest_setUpClass_fixture_TestWebfingerBackfill class 1 73 ms 73 ms
_django_isolate_apps function 301 65 ms 9 ms
_unittest_setUpClass_fixture_TestStarterPacks class 1 62 ms 62 ms
_unittest_setUpClass_fixture_TestRemoteFollowStarterPack class 2 61 ms 32 ms
_unittest_setUpClass_fixture_TestAddAccountsSearch class 1 60 ms 60 ms