flakytest.dev anze3db fedidevs
Profiles / #13

Passed Run of Nov 14, 10:21

CI github-actions:test · 28600ed main dirty · pass/fail report
Some tests got too few samples to explain their time. Rerun with pytest --flakytest-profile --flakytest-rate 2000.
Wall time
29.94 s
4 workers
Test time
1m 09s
sum of test durations
Tests
315
315 passed
Profiler
tachyon
1000 Hz · 67,115 samples · Python 3.15.2 · flakytest 2026.0b1
Peak memory
662 MB
4 workers together

Where the time goes

Test time by category
  • Password hashing20.53 s
  • Migrations16.92 s
  • Libraries11.43 s
  • Database9.96 s
  • DB schema5.24 s
  • Templates1.38 s
  • Imports1.00 s
  • Mocking996 ms
  • pytest418 ms
  • Unsampled361 ms
  • Factories274 ms
  • App code96 ms
  • Deep copies64 ms
  • Waiting23 ms
  • Network14 ms
  • Test code13 ms
  • Logging10 ms
  • Cache9 ms
  • Serialization5 ms
  • Fixture loading2 ms

Session timeline

Other
3 ms
Tests
1m 08s
Startup
6.25 s
Collection
2.02 s
Test phases
Setup 21.20 s Call 46.16 s Teardown 1.39 s

Fix next

Ranked by the time each fix saves per run
1

Use a fast password hasher in tests

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

High Password hashing
19.50 s per run
Fix: In your test settings set PASSWORD_HASHERS = ["django.contrib.auth.hashers.MD5PasswordHasher"] (currently PBKDF2PasswordHasher). Read the guide
Details

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

Where:

  • confs/tests.py:1044 TestCreateConference.setUp · 4.14 s
  • confs/tests.py:1175 TestEditConference.setUp · 2.81 s
  • confs/tests.py:1177 TestEditConference.setUp · 2.63 s
  • confs/tests.py:1176 TestEditConference.setUp · 2.58 s
  • confs/tests.py:1371 TestApproveConference.setUp · 2.09 s
  • confs/tests.py:1372 TestApproveConference.setUp · 2.05 s
  • confs/tests.py:1317 TestConferenceApprovalVisibility.setUp · 1.23 s
  • confs/tests.py:1316 TestConferenceApprovalVisibility.setUp · 1.23 s
  • confs/tests.py:1296 TestUnapproveConference.setUp · 498 ms
  • confs/tests.py:1295 TestUnapproveConference.setUp · 496 ms

Most affected tests:

  • confs/tests.py::TestEditConference::test_other_user_forbidden
  • confs/tests.py::TestEditConference::test_other_user_forbidden_on_approved_conference
  • confs/tests.py::TestEditConference::test_edit_does_not_change_slug
  • confs/tests.py::TestApproveConference::test_get_not_allowed
  • confs/tests.py::TestEditConference::test_owner_can_edit
  • confs/tests.py::TestEditConference::test_owner_can_edit_after_approval
  • confs/tests.py::TestApproveConference::test_staff_sees_approve_button_on_detail
  • fedidevs/tests.py::TestAnonymousCacheAndCsrf::test_authenticated_html_is_private_and_keeps_csrf_header

Documentation

2

Use plain static file storage in tests

Static file storage/manifest handling costs 16.0s.

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

Where:

  • accounts/views.py:425 index · 681 ms
  • starter_packs/tests.py:841 TestShareStarterPack.test_api_formats · 450 ms
  • confs/tests.py:875 TestConferencePage.test_conference_with_utc_with_date_no_posts · 362 ms
  • starter_packs/views.py:862 share_starter_pack · 324 ms
  • starter_packs/tests.py:125 TestCreateStarterPack.test_form_error · 275 ms
  • accounts/tests.py:550 TestAccountIndexRobots.assert_noindex · 272 ms
  • starter_packs/tests.py:1027 TestPinAccountInStarterPack.test_pin_button_shown_on_review_page · 269 ms
  • confs/views.py:296 _conference_detail · 256 ms
  • starter_packs/tests.py:709 TestShareStarterPack.test_logged_in · 225 ms
  • starter_packs/tests.py:781 TestShareStarterPack.test_order_by · 214 ms

Most affected tests:

  • confs/tests.py::TestConferencePage::test_conference_with_utc_with_date_no_posts
  • starter_packs/tests.py::TestPinAccountInStarterPack::test_pin_button_shown_on_review_page
  • starter_packs/tests.py::TestCreateStarterPack::test_form_error
  • accounts/tests.py::TestSelectedInstance::test_invalid_selected_instance
  • starter_packs/tests.py::TestShareStarterPack::test_logged_in
  • accounts/tests.py::TestStaticPages::test_developers_on_mastodon
  • confs/tests.py::TestMigratedLegacyConferences::test_djangoconus_date_redirects
  • starter_packs/tests.py::TestEditStarterPackAccounts::test_not_logged_in
3

Stop re-running migrations on every test run

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

High Migrations
15.22 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. Read the guide
Details

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

Where:

  • confs/tests.py:432 TestLegacyConferenceDataMigration._migrate · 938 ms
  • confs/migrations/0031_seed_conference_tags.py:14 seed_conference_tags · 449 ms
  • fedidevs/db/postgresql/base.py:39 DatabaseWrapper.get_new_connection · 141 ms
  • confs/migrations/0033_remove_legacy_conference_tables.py:388 _get_or_create_conference · 102 ms
  • confs/tests.py:412 TestLegacyConferenceDataMigration._leaf_targets · 61 ms
  • confs/tests.py:431 TestLegacyConferenceDataMigration._migrate · 55 ms
  • confs/migrations/0033_remove_legacy_conference_tables.py:214 _pk_batches · 54 ms
  • confs/migrations/0033_remove_legacy_conference_tables.py:398 migrate_legacy_pair · 42 ms
  • confs/migrations/0011_conferencepost_alter_conference_posts.py:11 update · 41 ms
  • confs/tests.py:430 TestLegacyConferenceDataMigration._migrate · 39 ms

Most affected tests:

  • confs/tests.py::TestSyncAnnouncements::test_is_idempotent_and_refreshes_unposted_content
  • accounts/tests.py::TestAccountIndexRobots::test_two_facets_are_noindex
  • confs/tests.py::TestMigratedLegacyConferences::test_fwd50_date_redirects
  • accounts/tests.py::TestSelectedInstance::test_invalid_selected_instance
  • 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 19.9s in total (password hashing 19.8s, db 166ms, factories 7ms) in 7 classes: TestCreateConference (10 tests), TestEditConference (9 tests), TestUnapproveConference (2 tests), TestConferenceApprovalVisibility (5 tests).

High Database
13.96 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). Read the guide
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 TestCreateConference.setUp · 4.16 s
  • confs/tests.py:1175 TestEditConference.setUp · 2.82 s
  • confs/tests.py:1177 TestEditConference.setUp · 2.64 s
  • confs/tests.py:1176 TestEditConference.setUp · 2.58 s
  • confs/tests.py:1371 TestApproveConference.setUp · 2.11 s
  • confs/tests.py:1372 TestApproveConference.setUp · 2.06 s
  • confs/tests.py:1317 TestConferenceApprovalVisibility.setUp · 1.24 s
  • confs/tests.py:1316 TestConferenceApprovalVisibility.setUp · 1.23 s
  • confs/tests.py:1296 TestUnapproveConference.setUp · 500 ms
  • confs/tests.py:1295 TestUnapproveConference.setUp · 497 ms

Most affected tests:

  • confs/tests.py::TestEditConference::test_other_user_forbidden
  • confs/tests.py::TestEditConference::test_other_user_forbidden_on_approved_conference
  • confs/tests.py::TestEditConference::test_edit_does_not_change_slug
  • confs/tests.py::TestApproveConference::test_get_not_allowed
  • confs/tests.py::TestEditConference::test_owner_can_edit
  • confs/tests.py::TestEditConference::test_owner_can_edit_after_approval
  • confs/tests.py::TestApproveConference::test_staff_sees_approve_button_on_detail
  • confs/tests.py::TestApproveConference::test_non_staff_forbidden

Documentation

5

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

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

High Database
9.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). Read the guide
Details

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

  • 45x in test_is_idempotent_and_refreshes_unposted_content: 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_fwd50_date_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_two_facets_are_noindex: 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_posts_from_yesterday_are_updated: SELECT COUNT(*) AS "__count" FROM "accounts_accountlookup" WHERE UPPER("accounts_accountlookup"."language"::text) LIKE UPPER(%s)

Most affected tests:

  • confs/tests.py::TestSyncAnnouncements::test_is_idempotent_and_refreshes_unposted_content
  • accounts/tests.py::TestSelectedInstance::test_invalid_selected_instance
  • confs/tests.py::TestMigratedLegacyConferences::test_fwd50_date_redirects
  • accounts/tests.py::TestAccountIndexRobots::test_two_facets_are_noindex
  • stats/tests.py::TestStats::test_posts_from_yesterday_are_updated
  • stats/tests.py::TestStats::test_store_daily_stats
  • stats/tests.py::TestStats::test_store_daily_stats_with_accounts
  • accounts/tests.py::TestInstanceIndexingBridgy::test_follows_redirect_and_coerces_null_version

Documentation

6

Make the test database server skip durability work

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

Medium Database
6.42 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. Read the guide
Details

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

Where:

  • fedidevs/db/postgresql/base.py:39 DatabaseWrapper.get_new_connection · 957 ms
  • confs/tests.py:432 TestLegacyConferenceDataMigration._migrate · 938 ms
  • starter_packs/tests.py:397 TestToggleStarterPackAccount.test_toggle_after_limit · 556 ms
  • confs/migrations/0031_seed_conference_tags.py:14 seed_conference_tags · 449 ms
  • starter_packs/views.py:862 share_starter_pack · 174 ms
  • starter_packs/views.py:858 share_starter_pack · 170 ms
  • confs/views.py:268 _conference_detail · 164 ms
  • starter_packs/views.py:89 pack_header_avatars · 154 ms
  • starter_packs/views.py:856 share_starter_pack · 135 ms
  • stats/models.py:20 store_daily_stats · 134 ms

Most affected tests:

  • confs/tests.py::TestSyncAnnouncements::test_is_idempotent_and_refreshes_unposted_content
  • accounts/tests.py::TestAccountIndexRobots::test_two_facets_are_noindex
  • accounts/tests.py::TestSelectedInstance::test_invalid_selected_instance
  • confs/tests.py::TestMigratedLegacyConferences::test_fwd50_date_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::MastodonRatelimitHeaderTests::test_creates_session_with_hook_when_none_given

Documentation

7

Disable django-debug-toolbar in tests

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

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

Where:

  • accounts/views.py:425 index · 681 ms
  • starter_packs/views.py:862 share_starter_pack · 324 ms
  • confs/views.py:296 _conference_detail · 256 ms
  • starter_packs/views.py:858 share_starter_pack · 170 ms
  • confs/views.py:268 _conference_detail · 166 ms
  • confs/views.py:509 create_conference · 155 ms
  • starter_packs/views.py:89 pack_header_avatars · 154 ms
  • starter_packs/views.py:856 share_starter_pack · 135 ms
  • accounts/templatetags/account_extras.py:27 render_language_emojis · 125 ms
  • accounts/views.py:28 CountlessPage.__init__ · 119 ms

Most affected tests:

  • accounts/tests.py::TestAccountIndexRobots::test_two_facets_are_noindex
  • confs/tests.py::TestCreateConference::test_form_renders_for_authenticated_user
  • confs/tests.py::TestMigratedLegacyConferences::test_fwd50_page
  • accounts/tests.py::TestSelectedInstance::test_invalid_selected_instance
  • starter_packs/tests.py::TestShareStarterPack::test_order_by_6___not_a_valid_option____4__3__2__1__0__
  • confs/tests.py::TestMigratedLegacyConferences::test_migrated_conference_shows_linked_posts
  • confs/tests.py::TestCreateConference::test_advanced_days_are_saved
  • accounts/tests.py::TestAccountIndexRobots::test_single_facet_is_indexable

Documentation

8

pytest-xdist workers finish at very different times

The busiest worker ran 23.7s of tests, the least busy 14.6s.

Medium Parallelism
4.55 s per run
Fix: Use --dist worksteal (pytest-xdist 3.2+) so idle workers take tests from busy ones; if you use --dist loadscope/loadfile, split the biggest classes or modules. Read the guide
Details

Documentation

9

pytest takes a long time before the first test runs

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

Medium Imports
3.31 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. Read the guide
Details
  • mastodon_auth/tests.py (870ms)
  • starter_packs/tests.py (269ms)
  • accounts/tests.py (27ms)
  • confs/tests.py (21ms)
  • stats/tests.py (3ms)
  • fedidevs/settings.py (1.4s)
  • debug_toolbar/panels/sql/__init__.py (988ms)
  • starter_packs/admin.py (652ms)

Documentation

10

Run migrations once, not once per worker

Each of the 4 pytest-xdist workers builds its own test database by running every migration: 19.5s in total, about 4.9s per worker. 14.6s of it repeats work another worker already did.

Medium Migrations
14.64 s per run
Fix: Migrate once and copy the database: let one worker build the test database and have the others create theirs from it as a template (on PostgreSQL, CREATE DATABASE ... TEMPLATE ..., which copies files instead of running migrations). Django's own test runner already does this with --parallel. Read the guide
Details

Every copy is built by the same migrations, so a broken migration still fails the run.

  • {'total': 19.52, 'builds': 4, 'workers': 4, 'per_build': 4.88}

Documentation

Tests

201–315 of 315, slowest first · click a column to sort this page
Test Outcome Duration Setup Call Teardown Mostly Queries
starter_packs/tests.py::TestOwnerManagement::test_owner_cancels_invitation
passed 65 ms 0.76 ms 64 ms 0.23 ms Database 28
starter_packs/tests.py::TestEditStarterPack::test_edit_starter_packs
passed 65 ms 0.63 ms 64 ms 0.23 ms Database 25
starter_packs/tests.py::TestShareStarterPack::test_order_by_htmx_swaps_account_list
passed 64 ms 0.72 ms 64 ms 0.26 ms Libraries 19
5 repeated
fedidevs/tests.py::TestRobotsTxt::test_disallows_query_strings_except_googlebot
passed 64 ms 1 ms 61 ms 0.96 ms Libraries –
starter_packs/tests.py::TestPinAccountInStarterPack::test_pinned_account_listed_first_for_everyone
passed 63 ms 2 ms 62 ms 0.23 ms Libraries 13
starter_packs/tests.py::TestOwnerManagement::test_pending_invitation_shown_on_starter_packs_page
passed 63 ms 0.66 ms 62 ms 0.27 ms Libraries 28
mastodon_auth/tests.py::MastodonAuthCallbackTests::test_invalid_grant_is_logged_as_warning_not_error
passed 63 ms 0.86 ms 62 ms 0.22 ms Mocking 8
starter_packs/tests.py::TestOwnerManagement::test_manage_owners_page
passed 63 ms 0.68 ms 62 ms 0.22 ms Database 27
starter_packs/tests.py::TestOwnerManagement::test_invite_without_account_access_is_rejected
passed 63 ms 0.69 ms 62 ms 0.25 ms Database 28
confs/tests.py::TestSyncAnnouncements::test_creates_and_links_start_and_end_announcements
passed 63 ms 16 ms 42 ms 5 ms Database 13
mastodon_auth/tests.py::MastodonAuthCallbackTests::test_oauth_error_redirect_is_surfaced
passed 63 ms 0.92 ms 62 ms 0.19 ms Libraries 5
fedidevs/tests.py::TestAnonymousCacheAndCsrf::test_plain_pages_are_indexable
passed 63 ms 0.95 ms 61 ms 0.25 ms Libraries 7
starter_packs/tests.py::TestOwnerManagement::test_only_invited_user_can_accept
passed 63 ms 0.69 ms 62 ms 0.25 ms Unsampled 31
fedidevs/tests.py::TestAccountIndexQueryParams::test_language_index_strips_unknown_params
passed 62 ms 0.85 ms 61 ms 0.28 ms Libraries –
starter_packs/tests.py::TestShareStarterPack::test_api_activitypub_leaves_out_accounts_without_activitypub_id
passed 62 ms 0.76 ms 61 ms 0.29 ms Libraries 14
fedidevs/tests.py::TestAnonymousCacheAndCsrf::test_anonymous_html_is_publicly_cacheable_without_csrf_cookie
passed 62 ms 1 ms 60 ms 0.25 ms Libraries 7
starter_packs/tests.py::TestPinAccountInStarterPack::test_removing_account_swaps_pin_button_to_disabled
passed 61 ms 0.64 ms 60 ms 0.23 ms Libraries 35
mastodon_auth/tests.py::MastodonAuthCallbackTests::test_token_exchange_failure_without_token_errors
passed 59 ms 0.62 ms 58 ms 0.22 ms Mocking 8
posts/tests.py::TestSubscribePages::test_subscribe_success_uses_tailwind_layout
passed 59 ms 9 ms 47 ms 3 ms Templates 6
fedidevs/tests.py::TestPotatoqDashboard::test_regular_user_is_forbidden
passed 59 ms 0.67 ms 58 ms 0.23 ms Libraries 22
accounts/tests.py::TestAccountIndexRobots::test_deep_pagination_is_noindex
passed 58 ms 0.70 ms 57 ms 0.35 ms Templates 8
fedidevs/tests.py::TestAnonymousCacheAndCsrf::test_query_string_pages_are_not_noindexed
passed 58 ms 0.76 ms 53 ms 4 ms Libraries 7
fedidevs/tests.py::TestPotatoqDashboard::test_staff_sees_dashboard
passed 58 ms 0.75 ms 57 ms 0.29 ms Database 22
starter_packs/tests.py::TestOwnerManagement::test_non_owner_cannot_open_manage_page
passed 58 ms 1 ms 56 ms 0.23 ms Libraries 23
starter_packs/tests.py::TestEditStarterPack::test_not_logged_in
passed 58 ms 0.68 ms 57 ms 0.23 ms Database 7
fedidevs/tests.py::TestPotatoqDashboard::test_superuser_without_staff_flag_sees_dashboard
passed 56 ms 0.65 ms 51 ms 4 ms Database 22
mastodon_auth/tests.py::MastodonAuthCallbackTests::test_missing_code_state_is_logged_at_error
passed 56 ms 0.77 ms 54 ms 0.42 ms Libraries 5
accounts/tests.py::TestStaticPages::test_faq
passed 55 ms 0.63 ms 50 ms 4 ms Templates 7
starter_packs/tests.py::TestShareStarterPack::test_api_activitypub_leaves_out_attributed_to_without_author_activitypub_id
passed 55 ms 0.74 ms 54 ms 0.25 ms Libraries 11
mastodon_auth/tests.py::MastodonAuthCallbackTests::test_oauth_access_denied_is_logged_as_warning_not_error
passed 54 ms 1 ms 53 ms 0.20 ms Libraries 5
posts/tests.py::TestDjangoConUSLegacyRedirect::test_djangoconus_redirects_to_conference_page
passed 50 ms 0.75 ms 46 ms 4 ms Unsampled 5
fedidevs/tests.py::TestPotatoqDashboard::test_anonymous_is_sent_to_login
passed 49 ms 0.60 ms 48 ms 0.19 ms Libraries 5
starter_packs/tests.py::TestShareStarterPack::test_not_existing_starter_pack
passed 49 ms 0.67 ms 48 ms 0.23 ms Libraries 6
fedidevs/tests.py::TestAnonymousCacheAndCsrf::test_csrf_endpoint_sets_cookie_and_returns_token
passed 48 ms 0.80 ms 47 ms 0.23 ms Database 5
starter_packs/tests.py::TestRemoteFollowStarterPack::test_redirects_to_subscribe_url
passed 48 ms 0.75 ms 47 ms 0.25 ms Database 6
mastodon_auth/tests.py::MastodonAuthCallbackTests::test_unknown_state_is_logged_as_warning_not_error
passed 46 ms 0.71 ms 43 ms 2 ms Libraries 5
starter_packs/tests.py::TestDeleteStarterPack::test_not_logged_in
passed 46 ms 0.79 ms 45 ms 0.20 ms Database 7
confs/tests.py::TestMigratedLegacyConferences::test_djangoconus_old_url_redirects
passed 45 ms 0.72 ms 44 ms 0.20 ms Database 5
announcements/tests.py::TestPostAnnouncements::test_does_not_repost_already_posted
passed 39 ms 18 ms 22 ms 0.19 ms Database 10
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_creates_account_when_neither_url_nor_pair_match
passed 38 ms 13 ms 25 ms 0.15 ms Database 12
confs/tests.py::TestSyncAnnouncements::test_variation_is_stable_across_resyncs
passed 36 ms 4 ms 28 ms 4 ms Database 17
4 repeated
starter_packs/tests.py::TestGetSubscribeUrl::test_no_subscribe_link
passed 30 ms 20 ms 10 ms 0.19 ms Database 5
starter_packs/tests.py::TestParseHandle::test_invalid_handles
passed 24 ms 14 ms 9 ms 0.18 ms Database 5
starter_packs/tests.py::TestParseHandle::test_valid_handles
passed 22 ms 2 ms 19 ms 1 ms Libraries 5
confs/tests.py::TestPostsAfterDatetime::test_aware_start_of_day_in_conference_timezone
passed 22 ms 10 ms 11 ms 0.18 ms Database 6
confs/tests.py::TestSyncAnnouncements::test_uses_one_of_the_message_variations
passed 20 ms 0.70 ms 19 ms 0.22 ms Database 13
confs/tests.py::TestSyncAnnouncements::test_post_at_uses_conference_timezone
passed 20 ms 0.70 ms 19 ms 0.23 ms Database 12
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_resolve_posts_does_not_scan_or_join_accounts_by_url
passed 19 ms 5 ms 14 ms 0.73 ms Database 9
confs/tests.py::TestSyncAnnouncements::test_skips_past_and_archived_conferences
passed 17 ms 1 ms 15 ms 0.21 ms Database 9
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_dedupes_same_url_and_same_pair_in_one_batch
passed 17 ms 0.50 ms 16 ms 0.20 ms Database 11
confs/tests.py::TestSyncAnnouncements::test_leaves_already_posted_announcements_untouched
passed 17 ms 0.87 ms 16 ms 0.21 ms Database 17
3 repeated
stats/tests.py::TestStats::test_all_daily_lang_stats
passed 16 ms 12 ms 4 ms 0.21 ms Database 5
confs/tests.py::TestMigratedLegacyConferences::test_account_kwargs_from_json
passed 15 ms 11 ms 3 ms 0.18 ms Database 5
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_match_existing_post_by_post_id_and_account
passed 14 ms 0.69 ms 13 ms 0.17 ms Database 10
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_match_existing_account_by_id_and_instance_when_url_differs
passed 13 ms 2 ms 11 ms 0.19 ms Database 9
confs/tests.py::TestSyncAnnouncements::test_skips_pending_conferences
passed 12 ms 0.64 ms 11 ms 0.22 ms Database 8
starter_packs/tests.py::TestGetSubscribeUrl::test_rejects_template_without_uri_placeholder
passed 11 ms 9 ms 2 ms 0.18 ms Unsampled 5
starter_packs/tests.py::TestGetSubscribeUrl::test_rejects_non_https_template
passed 11 ms 0.73 ms 9 ms 0.96 ms Database 5
announcements/tests.py::TestPostAnnouncements::test_skips_when_token_missing
passed 10 ms 0.76 ms 7 ms 2 ms Database 8
accounts/tests.py::TestCrawlerGotosocial::test_open_directory_resolves_missing_actor_uri_via_webfinger
passed 9 ms 0.91 ms 8 ms 0.22 ms Waiting –
announcements/tests.py::TestPostAnnouncements::test_posts_only_due_announcements
passed 9 ms 0.74 ms 8 ms 0.16 ms Database 11
3 repeated
announcements/tests.py::TestPostAnnouncements::test_dry_run_is_the_default
passed 9 ms 0.80 ms 8 ms 0.16 ms Database 9
announcements/tests.py::TestPostAnnouncements::test_records_error_and_leaves_row_unposted
passed 8 ms 0.59 ms 8 ms 0.15 ms Database 10
announcements/tests.py::TestPostAnnouncements::test_respects_visibility
passed 8 ms 0.55 ms 7 ms 0.16 ms Database 10
confs/tests.py::TestPostsAfterDatetime::test_none_when_unset
passed 8 ms 0.87 ms 5 ms 2 ms Unsampled 6
accounts/tests.py::TestCrawlerGotosocial::test_auth_gated_directory_caches_unknown_and_skips_misskey_probe
passed 8 ms 0.80 ms 7 ms 0.20 ms Waiting –
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_match_existing_account_by_url_when_ids_differ
passed 8 ms 0.99 ms 7 ms 0.18 ms Database 8
mastodon_auth/tests.py::MastodonLoginFormTests::test_rejects_invalid_idna_hostname
passed 7 ms 0.99 ms 3 ms 3 ms Database 5
confs/tests.py::TestMigratedLegacyConferences::test_legacy_tables_were_dropped
passed 7 ms 0.66 ms 6 ms 0.17 ms Database 6
confs/tests.py::TestConferenceOgImage::test_signature_changes_with_visible_content
passed 7 ms 1 ms 3 ms 2 ms Database 6
fedidevs/tests.py::TestRetryingPostgresBackend::test_gives_up_after_the_last_retry
passed 6 ms 1 ms 4 ms 0.17 ms Mocking –
starter_packs/tests.py::TestGetSubscribeUrl::test_webfinger_network_error
passed 5 ms 0.59 ms 1 ms 3 ms Unsampled 5
fedidevs/tests.py::TestRetryingPostgresBackend::test_conn_health_checks_enabled
passed 5 ms 4 ms 0.25 ms 0.17 ms pytest –
confs/tests.py::TestMigratedLegacyConferences::test_legacy_conferences_were_seeded
passed 4 ms 1 ms 3 ms 0.18 ms Database 6
mastodon_auth/tests.py::ParseDtTests::test_iso_string_with_offset
passed 4 ms 4 ms 0.18 ms 0.23 ms Unsampled –
mastodon_auth/tests.py::AuthorizeUrlTests::test_builds_code_flow_url_without_junk_params
passed 3 ms 2 ms 0.24 ms 1 ms pytest –
accounts/tests.py::TestCrawlerGotosocial::test_open_directory_on_non_gotosocial_leaves_uri_missing
passed 3 ms 0.90 ms 2 ms 0.23 ms pytest –
mastodon_auth/tests.py::RegisterAppTests::test_raises_when_credentials_missing_from_body
passed 3 ms 2 ms 1 ms 0.17 ms Libraries –
fedidevs/tests.py::TestRetryingPostgresBackend::test_does_not_retry_other_errors
passed 3 ms 1 ms 1 ms 0.26 ms Mocking –
starter_packs/tests.py::TestGetSubscribeUrl::test_returns_filled_template
passed 2 ms 0.60 ms 2 ms 0.15 ms Unsampled 5
mastodon_auth/tests.py::RegisterAppTests::test_returns_credentials_on_200
passed 2 ms 0.64 ms 1 ms 0.27 ms Unsampled –
starter_packs/tests.py::TestGetSubscribeUrl::test_webfinger_invalid_json
passed 2 ms 0.56 ms 1 ms 0.16 ms Unsampled 5
starter_packs/tests.py::TestGetSubscribeUrl::test_webfinger_404
passed 2 ms 0.59 ms 1 ms 0.15 ms Unsampled 5
accounts/tests.py::TestActivityPubActor::test_actor_to_account_defaults_maps_bridged_actor
passed 2 ms 1 ms 0.70 ms 0.21 ms Unsampled –
mastodon_auth/tests.py::ParseDtTests::test_naive_datetime_object_is_made_aware
passed 2 ms 2 ms 0.20 ms 0.17 ms Unsampled –
mastodon_auth/tests.py::RegisterAppTests::test_raises_with_none_status_on_network_error
passed 2 ms 1 ms 0.69 ms 0.17 ms pytest –
accounts/tests.py::TestMisskeyAdapter::test_noindex_flips_discoverable
passed 2 ms 2 ms 0.19 ms 0.22 ms pytest –
mastodon_auth/tests.py::IsValidRedirectQueryTests::test_rejects_malformed_or_incomplete_urls
passed 2 ms 0.62 ms 1 ms 0.19 ms Unsampled –
accounts/tests.py::TestJobTimeLimits::test_hourly_job_keeps_the_default_time_limit
passed 2 ms 1 ms 0.57 ms 0.27 ms pytest –
fedidevs/tests.py::TestRetryingPostgresBackend::test_retries_while_postgres_is_unavailable
passed 2 ms 0.61 ms 0.92 ms 0.21 ms pytest –
accounts/tests.py::TestJobTimeLimits::test_daily_job_has_no_time_limit
passed 2 ms 1 ms 0.41 ms 0.28 ms pytest –
mastodon_auth/tests.py::RegisterAppTests::test_raises_with_status_code_on_429
passed 2 ms 0.76 ms 0.71 ms 0.24 ms pytest –
mastodon_auth/tests.py::IsValidRedirectQueryTests::test_accepts_http_and_https_urls_with_host
passed 2 ms 0.94 ms 0.57 ms 0.19 ms Unsampled –
accounts/tests.py::TestMisskeyApi::test_build_miauth_url
passed 2 ms 1 ms 0.25 ms 0.28 ms pytest –
accounts/tests.py::TestMisskeyApi::test_is_misskey_family
passed 2 ms 1 ms 0.24 ms 0.19 ms pytest –
accounts/tests.py::TestParseDiscoverable::test_mastodon_null_or_absent
passed 2 ms 0.99 ms 0.34 ms 0.17 ms pytest –
mastodon_auth/tests.py::ParseDtTests::test_date_only_string_becomes_aware_midnight
passed 1 ms 0.92 ms 0.19 ms 0.33 ms Unsampled –
mastodon_auth/tests.py::ParseDtTests::test_date_object_becomes_aware_midnight
passed 1 ms 0.93 ms 0.21 ms 0.24 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_emojis_dict_converted_to_list
passed 1 ms 0.86 ms 0.29 ms 0.17 ms pytest –
mastodon_auth/tests.py::AuthorizeUrlTests::test_is_pleroma
passed 1 ms 0.70 ms 0.27 ms 0.30 ms pytest –
accounts/tests.py::TestMisskeyAdapter::test_maps_core_fields
passed 1 ms 0.78 ms 0.21 ms 0.28 ms pytest –
accounts/tests.py::TestMisskeyAdapter::test_remote_user_acct_includes_host
passed 1 ms 0.72 ms 0.19 ms 0.32 ms Unsampled –
mastodon_auth/tests.py::ParseDtTests::test_aware_datetime_object_passes_through
passed 1 ms 0.84 ms 0.19 ms 0.16 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_emojis_missing_returns_empty_list
passed 1 ms 0.66 ms 0.34 ms 0.16 ms Unsampled –
mastodon_auth/tests.py::ParseDtTests::test_none
passed 1 ms 0.68 ms 0.26 ms 0.21 ms Unsampled –
accounts/tests.py::TestActivityPubActor::test_media_and_profile_url_variants
passed 1 ms 0.71 ms 0.22 ms 0.22 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_falls_back_to_constructed_url_when_local
passed 1 ms 0.73 ms 0.24 ms 0.14 ms Unsampled –
accounts/tests.py::TestParseDiscoverable::test_top_level_false_wins_over_nested
passed 1 ms 0.69 ms 0.21 ms 0.22 ms pytest –
mastodon_auth/tests.py::AuthorizeUrlTests::test_force_login_included_only_when_requested
passed 1 ms 0.62 ms 0.34 ms 0.15 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_missing_avatar_and_banner_are_empty_strings
passed 1 ms 0.70 ms 0.23 ms 0.17 ms Unsampled –
accounts/tests.py::TestParseDiscoverable::test_pleroma_nested_in_source
passed 1 ms 0.72 ms 0.19 ms 0.17 ms Unsampled –
accounts/tests.py::TestParseDiscoverable::test_mastodon_top_level
passed 1 ms 0.70 ms 0.18 ms 0.19 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_missing_display_name_falls_back_to_username
passed 1 ms 0.67 ms 0.19 ms 0.17 ms Unsampled –
fedidevs/tests.py::TestRetryingPostgresBackend::test_postgres_engine_is_swapped_for_the_retrying_one
passed 1 ms 0.67 ms 0.21 ms 0.15 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_missing_required_fields_returns_none
passed 1 ms 0.69 ms 0.19 ms 0.14 ms pytest –

Slowest fixtures

Exact setup time across the session
Fixture Scope Calls Total Max
_django_setup_unittest class 81 19.54 s 4.95 s
django_db_setup session 4 19.52 s 4.95 s
_unittest_setUpClass_fixture_TestShareStarterPack class 2 126 ms 67 ms
_unittest_setUpClass_fixture_TestFollowBg class 2 111 ms 67 ms
_unittest_setUpClass_fixture_TestSelectedInstance class 1 100 ms 100 ms
_unittest_setUpClass_fixture_TestOwnerManagement class 2 90 ms 49 ms
_unittest_setUpClass_fixture_TestPinAccountInStarterPack class 2 81 ms 45 ms
_unittest_setUpClass_fixture_TestWebfingerBackfill class 1 74 ms 74 ms
_unittest_setUpClass_fixture_TestRemoteFollowStarterPack class 3 67 ms 28 ms
_unittest_setUpClass_fixture_TestEditStarterPackAccounts class 2 48 ms 28 ms
_unittest_setUpClass_fixture_TestCreateStarterPack class 2 46 ms 27 ms
_unittest_setUpClass_fixture_TestAddAccountsSearch class 1 39 ms 39 ms
_unittest_setUpClass_fixture_TestToggleStarterPackAccount class 1 37 ms 37 ms
_unittest_setUpClass_fixture_TestDeleteStarterPack class 1 33 ms 33 ms
_unittest_setUpClass_fixture_TestEditStarterPack class 1 31 ms 31 ms