flakytest.dev anze3db fedidevs
Profiles / #9

Passed Run of Nov 7, 17:55

CI github-actions:test · 4f01055 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
39.77 s
4 workers
Test time
1m 36s
sum of test durations
Tests
310
310 passed
Profiler
tachyon
1000 Hz · 94,964 samples · Python 3.15.2 · flakytest 2026.0b1
Peak memory
657 MB
4 workers together

Where the time goes

Test time by category
  • Password hashing27.38 s
  • Migrations25.36 s
  • Libraries19.22 s
  • Database13.37 s
  • Templates2.97 s
  • DB schema2.79 s
  • Mocking1.80 s
  • Imports1.57 s
  • pytest404 ms
  • Factories395 ms
  • Unsampled328 ms
  • App code102 ms
  • Cache81 ms
  • Deep copies57 ms
  • Waiting23 ms
  • Test code22 ms
  • Network16 ms
  • Logging16 ms
  • Serialization13 ms
  • Fixture loading1 ms

Session timeline

Other
7 ms
Tests
1m 36s
Startup
9.61 s
Collection
2.91 s
Test phases
Setup 28.46 s Call 1m 07s Teardown 848 ms

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 28.1s.

High App code
28.14 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 · 909 ms
  • starter_packs/tests.py:781 TestShareStarterPack.test_order_by · 749 ms
  • starter_packs/views.py:862 share_starter_pack · 685 ms
  • accounts/tests.py:550 TestAccountIndexRobots.assert_noindex · 601 ms
  • accounts/tests.py:555 TestAccountIndexRobots.assert_indexable · 556 ms
  • starter_packs/views.py:856 share_starter_pack · 544 ms
  • confs/views.py:509 create_conference · 443 ms
  • starter_packs/tests.py:841 TestShareStarterPack.test_api_formats · 429 ms
  • starter_packs/tests.py:954 TestShareStarterPack._get_activitypub · 421 ms
  • starter_packs/tests.py:1291 TestRemoteFollowStarterPack.test_deleted_pack_404 · 398 ms

Most affected tests:

  • starter_packs/tests.py::TestFollowStarterPack::test_instance_unreachable
  • starter_packs/tests.py::TestRemoteFollowStarterPack::test_deleted_pack_404
  • confs/tests.py::TestMigratedLegacyConferences::test_djangoconafrica_page
  • starter_packs/tests.py::TestStarterPacks::test_index_page
  • accounts/tests.py::TestSelectedInstance::test_invalid_selected_instance
  • confs/tests.py::TestCreateConference::test_rejects_more_than_three_icons
  • accounts/tests.py::TestAccountIndexRobots::test_two_facets_are_noindex
  • starter_packs/tests.py::TestShareStarterPack::test_api_activitypub_leaves_out_accounts_without_activitypub_id
2

Use a fast password hasher in tests

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

High Password hashing
26.01 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 · 5.21 s
  • confs/tests.py:1176 TestEditConference.setUp · 3.81 s
  • confs/tests.py:1177 TestEditConference.setUp · 3.73 s
  • confs/tests.py:1175 TestEditConference.setUp · 3.68 s
  • confs/tests.py:1371 TestApproveConference.setUp · 2.82 s
  • confs/tests.py:1372 TestApproveConference.setUp · 2.73 s
  • confs/tests.py:1317 TestConferenceApprovalVisibility.setUp · 1.54 s
  • confs/tests.py:1316 TestConferenceApprovalVisibility.setUp · 1.53 s
  • fedidevs/tests.py:63 TestAnonymousCacheAndCsrf.test_authenticated_html_is_private_and_keeps_csrf_header · 660 ms
  • confs/tests.py:1295 TestUnapproveConference.setUp · 607 ms

Most affected tests:

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

Documentation

3

Stop re-running migrations on every test run

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

High Migrations
22.82 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 · 1.16 s
  • confs/migrations/0031_seed_conference_tags.py:14 seed_conference_tags · 806 ms
  • confs/migrations/0033_remove_legacy_conference_tables.py:388 _get_or_create_conference · 143 ms
  • confs/tests.py:412 TestLegacyConferenceDataMigration._leaf_targets · 130 ms
  • confs/tests.py:430 TestLegacyConferenceDataMigration._migrate · 83 ms
  • confs/tests.py:431 TestLegacyConferenceDataMigration._migrate · 66 ms
  • confs/migrations/0033_remove_legacy_conference_tables.py:214 _pk_batches · 65 ms
  • confs/migrations/0033_remove_legacy_conference_tables.py:325 _refresh_account_counts · 50 ms
  • confs/migrations/0033_remove_legacy_conference_tables.py:398 migrate_legacy_pair · 48 ms
  • starter_packs/migrations/0004_starterpack_published_at.py:9 set_published_at · 46 ms

Most affected tests:

  • confs/tests.py::TestMigratedLegacyConferences::test_fwd50_date_redirects
  • accounts/tests.py::TestAccountIndexRobots::test_two_facets_are_noindex
  • confs/tests.py::TestSyncAnnouncements::test_is_idempotent_and_refreshes_unposted_content
  • 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 26.5s in total (password hashing 26.3s, db 186ms, library 9ms) in 7 classes: TestFollowStarterPack (3 tests), TestApproveConference (6 tests), TestPostAnnouncements (6 tests), TestCreateConference (10 tests).

High Database
18.53 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 · 5.23 s
  • confs/tests.py:1176 TestEditConference.setUp · 3.83 s
  • confs/tests.py:1177 TestEditConference.setUp · 3.74 s
  • confs/tests.py:1175 TestEditConference.setUp · 3.69 s
  • confs/tests.py:1371 TestApproveConference.setUp · 2.84 s
  • confs/tests.py:1372 TestApproveConference.setUp · 2.74 s
  • confs/tests.py:1317 TestConferenceApprovalVisibility.setUp · 1.55 s
  • confs/tests.py:1316 TestConferenceApprovalVisibility.setUp · 1.54 s
  • confs/tests.py:1295 TestUnapproveConference.setUp · 610 ms
  • confs/tests.py:1296 TestUnapproveConference.setUp · 601 ms

Most affected tests:

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

Documentation

5

Disable django-debug-toolbar in tests

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

High App code
10.98 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 · 909 ms
  • starter_packs/views.py:862 share_starter_pack · 685 ms
  • starter_packs/views.py:856 share_starter_pack · 544 ms
  • confs/views.py:509 create_conference · 443 ms
  • confs/views.py:296 _conference_detail · 355 ms
  • starter_packs/views.py:185 starter_packs · 351 ms
  • starter_packs/views.py:60 get_editable_pack · 297 ms
  • accounts/views.py:28 CountlessPage.__init__ · 296 ms
  • accounts/templatetags/account_extras.py:36 instances_datalist · 282 ms
  • accounts/templatetags/account_extras.py:34 instances_datalist · 277 ms

Most affected tests:

  • confs/tests.py::TestMigratedLegacyConferences::test_djangoconafrica_page
  • accounts/tests.py::TestAccountIndexRobots::test_two_facets_are_noindex
  • starter_packs/tests.py::TestStarterPacks::test_index_page
  • accounts/tests.py::TestStaticPages::test_developers_on_mastodon
  • confs/tests.py::TestCreateConference::test_form_renders_for_authenticated_user
  • accounts/tests.py::TestSelectedInstance::test_invalid_selected_instance
  • accounts/tests.py::TestAccountIndexRobots::test_single_facet_is_indexable
  • fedidevs/tests.py::TestAnonymousCacheAndCsrf::test_anonymous_forms_work_after_csrf_bootstrap

Documentation

6

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

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

High Database
10.58 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_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
  • 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
  • 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:

  • 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
  • confs/tests.py::TestSyncAnnouncements::test_is_idempotent_and_refreshes_unposted_content
  • 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

7

Make the test database server skip durability work

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

Medium Database
8.30 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:

  • confs/tests.py:432 TestLegacyConferenceDataMigration._migrate · 1.16 s
  • confs/migrations/0031_seed_conference_tags.py:14 seed_conference_tags · 806 ms
  • starter_packs/tests.py:397 TestToggleStarterPackAccount.test_toggle_after_limit · 672 ms
  • starter_packs/views.py:856 share_starter_pack · 543 ms
  • starter_packs/views.py:862 share_starter_pack · 336 ms
  • starter_packs/views.py:60 get_editable_pack · 297 ms
  • accounts/views.py:28 CountlessPage.__init__ · 296 ms
  • accounts/templatetags/account_extras.py:36 instances_datalist · 282 ms
  • accounts/templatetags/account_extras.py:34 instances_datalist · 277 ms
  • starter_packs/views.py:858 share_starter_pack · 254 ms

Most affected tests:

  • 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
  • confs/tests.py::TestSyncAnnouncements::test_is_idempotent_and_refreshes_unposted_content
  • 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
  • accounts/tests.py::TestInstanceIndexingBridgy::test_follows_redirect_and_coerces_null_version

Documentation

8

pytest-xdist workers finish at very different times

The busiest worker ran 31.9s of tests, the least busy 20.9s.

Medium Parallelism
5.47 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 9.6s and collection 2.9s on every run, even when you only run one test.

Medium Imports
5.01 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 (1.1s)
  • starter_packs/tests.py (335ms)
  • accounts/tests.py (57ms)
  • confs/tests.py (13ms)
  • stats/tests.py (6ms)
  • fedidevs/settings.py (2.7s)
  • debug_toolbar/panels/sql/__init__.py (1.4s)
  • starter_packs/admin.py (761ms)

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: 25.9s in total, about 6.5s per worker. 19.5s of it repeats work another worker already did.

Medium Migrations
19.46 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': 25.948, 'builds': 4, 'workers': 4, 'per_build': 6.487}

Documentation

Tests

201–310 of 310, slowest first · click a column to sort this page
Test Outcome Duration Setup Call Teardown Mostly Queries
starter_packs/tests.py::TestRemoteFollowStarterPack::test_get_not_allowed
passed 103 ms 2 ms 100 ms 0.33 ms Libraries 5
fedidevs/tests.py::TestAnonymousCacheAndCsrf::test_anonymous_post_without_csrf_is_rejected
passed 102 ms 2 ms 100 ms 0.56 ms Libraries 7
starter_packs/tests.py::TestPinAccountInStarterPack::test_pinned_account_first_for_every_sort_option
passed 101 ms 0.92 ms 99 ms 0.34 ms Database 13
starter_packs/tests.py::TestOwnerManagement::test_non_owner_cannot_invite
passed 100 ms 1 ms 99 ms 0.27 ms Libraries 23
starter_packs/tests.py::TestOwnerManagement::test_search_excludes_invited_users
passed 100 ms 0.96 ms 99 ms 0.31 ms Database 29
mastodon_auth/tests.py::MastodonAuthCallbackTests::test_oauth_access_denied_is_logged_as_warning_not_error
passed 99 ms 1 ms 98 ms 0.23 ms Libraries 5
mastodon_auth/tests.py::MastodonLoginViewTests::test_create_app_failure_without_existing_credentials_errors
passed 99 ms 11 ms 87 ms 0.33 ms Database 7
fedidevs/tests.py::TestAccountIndexQueryParams::test_unknown_param_is_stripped_from_faceted_url
passed 99 ms 2 ms 96 ms 0.37 ms Libraries –
fedidevs/tests.py::TestAccountIndexQueryParams::test_language_index_strips_unknown_params
passed 97 ms 1 ms 95 ms 0.32 ms Libraries –
starter_packs/tests.py::TestOwnerManagement::test_search_excludes_existing_owners
passed 96 ms 1 ms 95 ms 0.33 ms Database 29
accounts/tests.py::TestAccountIndexRobots::test_paginated_single_facet_is_noindex
passed 96 ms 1 ms 94 ms 0.40 ms Database 8
mastodon_auth/tests.py::MastodonLoginViewTests::test_pleroma_login_forces_consent_flow
passed 96 ms 1 ms 93 ms 1 ms Mocking 9
starter_packs/tests.py::TestOwnerManagement::test_invite_existing_owner_is_noop
passed 95 ms 0.95 ms 94 ms 0.32 ms Database 29
posts/tests.py::TestDjangoConUSLegacyRedirect::test_djangoconus_redirects_to_conference_page
passed 95 ms 1 ms 90 ms 3 ms Libraries 5
fedidevs/tests.py::TestAnonymousCacheAndCsrf::test_anonymous_html_is_publicly_cacheable_without_csrf_cookie
passed 94 ms 1 ms 92 ms 0.53 ms Libraries 7
fedidevs/tests.py::TestAccountIndexQueryParams::test_empty_q_is_preserved
passed 94 ms 2 ms 91 ms 0.59 ms Libraries –
mastodon_auth/tests.py::RedirectToLocalViewTests::test_invalid_query_redirects_to_home
passed 93 ms 13 ms 80 ms 0.28 ms Libraries 5
posts/tests.py::TestSubscribePages::test_subscribe_success_uses_tailwind_layout
passed 92 ms 13 ms 79 ms 0.27 ms Libraries 6
starter_packs/tests.py::TestRemoteFollowStarterPack::test_redirects_to_subscribe_url
passed 92 ms 1 ms 90 ms 0.30 ms Mocking 6
starter_packs/tests.py::TestOwnerManagement::test_removing_self_redirects_home
passed 91 ms 2 ms 89 ms 0.29 ms Database 27
confs/tests.py::TestConferencePage::test_conference_with_pacific_with_date_no_posts
passed 88 ms 0.90 ms 87 ms 0.26 ms Database 12
posts/tests.py::TestDjangoConUSLegacyRedirect::test_djangoconus_date_redirects
passed 87 ms 15 ms 72 ms 0.30 ms Libraries 5
mastodon_auth/tests.py::MastodonLoginFormTests::test_cleans_instance_to_ascii_hostname
passed 85 ms 26 ms 58 ms 0.30 ms Imports 5
mastodon_auth/tests.py::MastodonLoginViewTests::test_create_app_rate_limited_reuses_existing_credentials
passed 84 ms 1 ms 82 ms 0.30 ms Mocking 8
mastodon_auth/tests.py::RedirectToLocalViewTests::test_valid_query_redirects_unauthenticated_users_to_target
passed 84 ms 2 ms 81 ms 1 ms Libraries 5
fedidevs/tests.py::TestPotatoqDashboard::test_staff_sees_dashboard
passed 84 ms 1 ms 82 ms 0.28 ms Libraries 22
starter_packs/tests.py::TestFollowBg::test_continues_after_other_errors
passed 82 ms 53 ms 29 ms 0.33 ms Database 25
12 repeated
fedidevs/tests.py::TestPotatoqDashboard::test_superuser_without_staff_flag_sees_dashboard
passed 82 ms 0.91 ms 76 ms 5 ms Libraries 22
confs/tests.py::TestMigratedLegacyConferences::test_dotnetconf_page
passed 81 ms 0.90 ms 77 ms 3 ms Libraries 11
fedidevs/tests.py::TestAnonymousCacheAndCsrf::test_csrf_endpoint_sets_cookie_and_returns_token
passed 79 ms 1 ms 78 ms 0.28 ms Libraries 5
mastodon_auth/tests.py::MastodonVersionCheckTests::test_log_in_survives_instance_endpoint_rejecting_requests
passed 77 ms 1 ms 76 ms 0.40 ms Libraries –
mastodon_auth/tests.py::MastodonLoginViewTests::test_invalid_instance_redirects_before_http_request
passed 76 ms 1 ms 74 ms 0.29 ms Mocking 5
confs/tests.py::TestSyncAnnouncements::test_creates_and_links_start_and_end_announcements
passed 74 ms 29 ms 40 ms 4 ms Database 13
mastodon_auth/tests.py::MastodonAuthCallbackTests::test_oauth_error_redirect_is_surfaced
passed 73 ms 0.93 ms 72 ms 0.26 ms Libraries 5
stats/tests.py::TestStarterPackStats::test_starter_pack_stats
passed 66 ms 20 ms 40 ms 6 ms Database 25
15 repeated
accounts/tests.py::TestActivityPubActor::test_media_and_profile_url_variants
passed 65 ms 0.84 ms 0.22 ms 64 ms DB schema 1
fedidevs/tests.py::TestPotatoqDashboard::test_anonymous_is_sent_to_login
passed 63 ms 0.92 ms 62 ms 0.29 ms Libraries 5
announcements/tests.py::TestPostAnnouncements::test_does_not_repost_already_posted
passed 46 ms 15 ms 30 ms 0.36 ms Database 10
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_creates_account_when_neither_url_nor_pair_match
passed 40 ms 16 ms 24 ms 0.24 ms Database 12
confs/tests.py::TestSyncAnnouncements::test_variation_is_stable_across_resyncs
passed 38 ms 1 ms 32 ms 4 ms Database 17
4 repeated
stats/tests.py::TestStats::test_all_daily_lang_stats
passed 36 ms 29 ms 7 ms 0.28 ms Database 5
confs/tests.py::TestPostsAfterDatetime::test_aware_start_of_day_in_conference_timezone
passed 34 ms 20 ms 14 ms 0.25 ms Database 6
confs/tests.py::TestMigratedLegacyConferences::test_account_kwargs_from_json
passed 33 ms 26 ms 7 ms 0.26 ms Database 5
confs/tests.py::TestSyncAnnouncements::test_leaves_already_posted_announcements_untouched
passed 31 ms 4 ms 26 ms 0.34 ms Database 17
3 repeated
starter_packs/tests.py::TestGetSubscribeUrl::test_webfinger_invalid_json
passed 31 ms 19 ms 11 ms 0.25 ms Database 5
announcements/tests.py::TestPostAnnouncements::test_posts_only_due_announcements
passed 25 ms 1 ms 24 ms 0.31 ms Database 11
3 repeated
starter_packs/tests.py::TestFollowBg::test_stops_after_unauthorized
passed 25 ms 4 ms 18 ms 3 ms Database 10
announcements/tests.py::TestPostAnnouncements::test_dry_run_is_the_default
passed 22 ms 4 ms 17 ms 0.54 ms Database 9
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_resolve_posts_does_not_scan_or_join_accounts_by_url
passed 22 ms 1 ms 18 ms 3 ms Database 9
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_match_existing_post_by_post_id_and_account
passed 22 ms 0.88 ms 20 ms 0.25 ms Database 10
starter_packs/tests.py::TestGetSubscribeUrl::test_no_subscribe_link
passed 20 ms 14 ms 6 ms 0.27 ms Database 5
starter_packs/tests.py::TestParseHandle::test_invalid_handles
passed 20 ms 15 ms 5 ms 0.32 ms Database 5
confs/tests.py::TestConferenceOgImage::test_signature_changes_with_visible_content
passed 18 ms 6 ms 8 ms 3 ms Database 6
confs/tests.py::TestPostsAfterDatetime::test_none_when_unset
passed 17 ms 3 ms 8 ms 6 ms Database 6
announcements/tests.py::TestPostAnnouncements::test_records_error_and_leaves_row_unposted
passed 16 ms 1 ms 15 ms 0.35 ms Unsampled 10
announcements/tests.py::TestPostAnnouncements::test_skips_when_token_missing
passed 14 ms 2 ms 11 ms 1 ms Database 8
confs/tests.py::TestSyncAnnouncements::test_uses_one_of_the_message_variations
passed 14 ms 1 ms 13 ms 0.29 ms Database 13
confs/tests.py::TestSyncAnnouncements::test_post_at_uses_conference_timezone
passed 14 ms 1 ms 12 ms 0.30 ms Database 12
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_dedupes_same_url_and_same_pair_in_one_batch
passed 14 ms 0.90 ms 12 ms 0.27 ms Database 11
announcements/tests.py::TestPostAnnouncements::test_respects_visibility
passed 13 ms 1 ms 12 ms 0.49 ms Database 10
starter_packs/tests.py::TestParseHandle::test_valid_handles
passed 13 ms 1 ms 8 ms 4 ms Database 5
confs/tests.py::TestSyncAnnouncements::test_skips_past_and_archived_conferences
passed 11 ms 1 ms 10 ms 0.28 ms Database 9
starter_packs/tests.py::TestGetSubscribeUrl::test_webfinger_network_error
passed 10 ms 3 ms 6 ms 0.92 ms pytest 5
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_match_existing_account_by_id_and_instance_when_url_differs
passed 10 ms 1 ms 8 ms 0.21 ms Database 9
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_match_existing_account_by_url_when_ids_differ
passed 9 ms 1 ms 8 ms 0.21 ms Database 8
confs/tests.py::TestMigratedLegacyConferences::test_legacy_tables_were_dropped
passed 9 ms 1 ms 8 ms 0.23 ms Database 6
confs/tests.py::TestSyncAnnouncements::test_skips_pending_conferences
passed 9 ms 1 ms 7 ms 0.24 ms Database 8
accounts/tests.py::TestCrawlerGotosocial::test_auth_gated_directory_caches_unknown_and_skips_misskey_probe
passed 9 ms 2 ms 6 ms 0.27 ms Waiting –
mastodon_auth/tests.py::MastodonLoginFormTests::test_rejects_invalid_idna_hostname
passed 8 ms 0.89 ms 3 ms 4 ms Database 5
starter_packs/tests.py::TestGetSubscribeUrl::test_webfinger_404
passed 8 ms 1 ms 2 ms 4 ms Database 5
accounts/tests.py::TestParseDiscoverable::test_mastodon_null_or_absent
passed 5 ms 3 ms 2 ms 0.57 ms Libraries –
accounts/tests.py::TestMisskeyAdapter::test_missing_required_fields_returns_none
passed 5 ms 5 ms 0.23 ms 0.20 ms Unsampled –
accounts/tests.py::TestCrawlerGotosocial::test_open_directory_resolves_missing_actor_uri_via_webfinger
passed 5 ms 1 ms 4 ms 0.32 ms Waiting –
mastodon_auth/tests.py::IsValidRedirectQueryTests::test_rejects_malformed_or_incomplete_urls
passed 5 ms 2 ms 3 ms 0.31 ms pytest –
starter_packs/tests.py::TestGetSubscribeUrl::test_rejects_non_https_template
passed 5 ms 1 ms 4 ms 0.21 ms Database 5
accounts/tests.py::TestMisskeyAdapter::test_emojis_dict_converted_to_list
passed 5 ms 4 ms 0.65 ms 0.48 ms pytest –
confs/tests.py::TestMigratedLegacyConferences::test_legacy_conferences_were_seeded
passed 4 ms 0.98 ms 3 ms 0.23 ms Database 6
accounts/tests.py::TestMisskeyAdapter::test_noindex_flips_discoverable
passed 4 ms 2 ms 1 ms 0.22 ms Unsampled –
starter_packs/tests.py::TestGetSubscribeUrl::test_returns_filled_template
passed 4 ms 1 ms 3 ms 0.20 ms pytest 5
starter_packs/tests.py::TestGetSubscribeUrl::test_rejects_template_without_uri_placeholder
passed 4 ms 1 ms 2 ms 0.46 ms Database 5
mastodon_auth/tests.py::IsValidRedirectQueryTests::test_accepts_http_and_https_urls_with_host
passed 4 ms 2 ms 1 ms 0.48 ms pytest –
accounts/tests.py::TestCrawlerGotosocial::test_open_directory_on_non_gotosocial_leaves_uri_missing
passed 4 ms 1 ms 2 ms 0.27 ms Waiting –
mastodon_auth/tests.py::RegisterAppTests::test_raises_when_credentials_missing_from_body
passed 4 ms 2 ms 1 ms 0.47 ms Unsampled –
mastodon_auth/tests.py::RegisterAppTests::test_returns_credentials_on_200
passed 3 ms 1 ms 1 ms 0.69 ms Mocking –
accounts/tests.py::TestParseDiscoverable::test_top_level_false_wins_over_nested
passed 3 ms 2 ms 0.23 ms 0.26 ms Unsampled –
mastodon_auth/tests.py::RegisterAppTests::test_raises_with_status_code_on_429
passed 3 ms 1 ms 1 ms 0.26 ms pytest –
mastodon_auth/tests.py::RegisterAppTests::test_raises_with_none_status_on_network_error
passed 3 ms 2 ms 0.97 ms 0.28 ms Mocking –
accounts/tests.py::TestParseDiscoverable::test_pleroma_nested_in_source
passed 3 ms 2 ms 0.39 ms 0.22 ms Unsampled –
mastodon_auth/tests.py::AuthorizeUrlTests::test_builds_code_flow_url_without_junk_params
passed 3 ms 2 ms 0.41 ms 0.29 ms Libraries –
accounts/tests.py::TestParseDiscoverable::test_mastodon_top_level
passed 3 ms 2 ms 0.26 ms 0.20 ms Unsampled –
accounts/tests.py::TestJobTimeLimits::test_hourly_job_keeps_the_default_time_limit
passed 3 ms 2 ms 0.55 ms 0.40 ms pytest –
mastodon_auth/tests.py::ParseDtTests::test_aware_datetime_object_passes_through
passed 3 ms 2 ms 0.53 ms 0.27 ms pytest –
accounts/tests.py::TestMisskeyApi::test_build_miauth_url
passed 2 ms 2 ms 0.30 ms 0.27 ms pytest –
accounts/tests.py::TestMisskeyAdapter::test_emojis_missing_returns_empty_list
passed 2 ms 2 ms 0.42 ms 0.20 ms pytest –
mastodon_auth/tests.py::ParseDtTests::test_date_only_string_becomes_aware_midnight
passed 2 ms 1 ms 0.60 ms 0.44 ms pytest –
accounts/tests.py::TestMisskeyAdapter::test_maps_core_fields
passed 2 ms 1 ms 0.47 ms 0.32 ms Unsampled –
accounts/tests.py::TestJobTimeLimits::test_daily_job_has_no_time_limit
passed 2 ms 2 ms 0.44 ms 0.28 ms pytest –
mastodon_auth/tests.py::AuthorizeUrlTests::test_is_pleroma
passed 2 ms 1 ms 0.54 ms 0.30 ms pytest –
accounts/tests.py::TestActivityPubActor::test_actor_to_account_defaults_bot_and_locked
passed 2 ms 2 ms 0.56 ms 0.20 ms pytest –
accounts/tests.py::TestMisskeyAdapter::test_falls_back_to_constructed_url_when_local
passed 2 ms 1 ms 0.39 ms 0.46 ms Unsampled –
mastodon_auth/tests.py::ParseDtTests::test_date_object_becomes_aware_midnight
passed 2 ms 2 ms 0.34 ms 0.23 ms pytest –
mastodon_auth/tests.py::ParseDtTests::test_iso_string_with_offset
passed 2 ms 2 ms 0.47 ms 0.25 ms pytest –
accounts/tests.py::TestMisskeyAdapter::test_missing_avatar_and_banner_are_empty_strings
passed 2 ms 2 ms 0.37 ms 0.27 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_remote_user_acct_includes_host
passed 2 ms 1 ms 0.32 ms 0.55 ms Unsampled –
mastodon_auth/tests.py::AuthorizeUrlTests::test_force_login_included_only_when_requested
passed 2 ms 1 ms 0.38 ms 0.24 ms Libraries –
accounts/tests.py::TestMisskeyApi::test_is_misskey_family
passed 2 ms 1 ms 0.25 ms 0.49 ms Unsampled –
mastodon_auth/tests.py::ParseDtTests::test_naive_datetime_object_is_made_aware
passed 2 ms 1 ms 0.37 ms 0.23 ms pytest –
mastodon_auth/tests.py::ParseDtTests::test_none
passed 2 ms 1 ms 0.27 ms 0.32 ms Unsampled –
accounts/tests.py::TestActivityPubActor::test_actor_to_account_defaults_maps_bridged_actor
passed 1 ms 0.86 ms 0.26 ms 0.22 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_missing_display_name_falls_back_to_username
passed 1 ms 0.89 ms 0.23 ms 0.22 ms pytest –

Slowest fixtures

Exact setup time across the session
Fixture Scope Calls Total Max
_django_setup_unittest class 79 25.98 s 6.54 s
django_db_setup session 4 25.95 s 6.54 s
_unittest_setUpClass_fixture_TestShareStarterPack class 3 233 ms 109 ms
_unittest_setUpClass_fixture_TestSelectedInstance class 1 199 ms 199 ms
_unittest_setUpClass_fixture_TestPinAccountInStarterPack class 3 179 ms 61 ms
_unittest_setUpClass_fixture_TestFollowStarterPack class 2 112 ms 65 ms
_unittest_setUpClass_fixture_TestOwnerManagement class 2 96 ms 53 ms
_unittest_setUpClass_fixture_TestDeleteStarterPack class 2 88 ms 46 ms
_unittest_setUpClass_fixture_TestWebfingerBackfill class 1 85 ms 85 ms
_unittest_setUpClass_fixture_TestStarterPacks class 2 77 ms 41 ms
_unittest_setUpClass_fixture_TestEditStarterPack class 2 71 ms 40 ms
_unittest_setUpClass_fixture_TestRemoteFollowStarterPack class 2 69 ms 39 ms
_unittest_setUpClass_fixture_TestAddAccountsSearch class 1 56 ms 56 ms
_unittest_setUpClass_fixture_TestFollowBg class 1 51 ms 51 ms
_unittest_setUpClass_fixture_TestConferencePage class 1 46 ms 46 ms