flakytest.dev anze3db fedidevs
Tests / mastodon_auth/tests.py

MastodonVersionCheckTests::test_log_in_survives_instance_endpoint_rejecting_requests

First seen 1 month ago in 9603516
CI github-actions:test 8 runs
Average
224 ms
median 136 ms
max 665 ms
Phases
Setup 1 ms Call 90 ms Teardown 133 ms
Categories
Network 0.30 ms App code 0.12 ms Other (DB schema, Libraries, pytest, Mocking, ...) 223 ms

1 database queries per run

Needs 270 KB of memory (max 684 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 2 weeks ago · open run
Show pytest frames
call141 ms88.0%
MastodonVersionCheckTests.test_log_in_survives_instance_endpoint_rejecting_requestsmastodon_auth/tests.py:311 token = mastodon.log_in(11 ms6.8%
Mastodon.log_inmastodon/authentication.py:4837 ms4.6%
Mastodon.retrieve_mastodon_versionmastodon_auth/oauth.py:66 return super().retrieve_mastodon_version(fail_hard=fail_hard)7 ms4.6%
Mastodon.retrieve_mastodon_versionmastodon/utility.py:415 ms3.0%
Mastodon.__instancemastodon/instance.py:435 ms3.0%
Mastodon.__api_requestmastodon/internals.py:2785 ms3.0%
Mastodon.__try_cast_to_typemastodon/internals.py:1355 ms3.0%
try_cast_recursemastodon/types_base.py:4245 ms3.0%
try_castmastodon/types_base.py:2985 ms3.0%
AttribAccessDict.__init__mastodon/types_base.py:6394 ms2.3%
AttribAccessDict.__setitem__mastodon/types_base.py:7034 ms2.3%
get_type_hints<stdlib>/typing.py:24602 ms1.5%
_eval_type<stdlib>/typing.py:4752 ms1.5%
evaluate_forward_ref<stdlib>/typing.py:10522 ms1.5%
_make_forward_ref<stdlib>/typing.py:10042 ms1.5%
ForwardRef.__forward_code__<stdlib>/annotationlib.py:3021 ms0.8%
AttribAccessDict.__init__mastodon/types_base.py:6421 ms0.8%
AttribAccessDict.__setitem__mastodon/types_base.py:7031 ms0.8%
get_type_hints<stdlib>/typing.py:24591 ms0.8%
_make_forward_ref<stdlib>/typing.py:10041 ms0.8%
ForwardRef.__forward_code__<stdlib>/annotationlib.py:3021 ms0.8%
Mastodon.retrieve_mastodon_versionmastodon/utility.py:562 ms1.5%
Mastodon.__instance_v2mastodon/instance.py:632 ms1.5%
Mastodon.__api_requestmastodon/internals.py:2782 ms1.5%
Mastodon.__try_cast_to_typemastodon/internals.py:1352 ms1.5%
try_cast_recursemastodon/types_base.py:4242 ms1.5%
try_castmastodon/types_base.py:2982 ms1.5%
AttribAccessDict.__init__mastodon/types_base.py:6392 ms1.5%
AttribAccessDict.__setitem__mastodon/types_base.py:7032 ms1.5%
get_type_hints<stdlib>/typing.py:24551 ms0.8%
get_type_hints<stdlib>/typing.py:24601 ms0.8%
_eval_type<stdlib>/typing.py:4751 ms0.8%
evaluate_forward_ref<stdlib>/typing.py:10581 ms0.8%
_eval_type<stdlib>/typing.py:4751 ms0.8%
Mastodon.log_inmastodon/authentication.py:4074 ms2.3%
Mastodon.oauth_authorization_server_infomastodon/authentication.py:3584 ms2.3%
Mastodon.__api_requestmastodon/internals.py:2784 ms2.3%
Mastodon.__try_cast_to_typemastodon/internals.py:1354 ms2.3%
try_cast_recursemastodon/types_base.py:4144 ms2.3%
try_cast_recursemastodon/types_base.py:4244 ms2.3%
try_castmastodon/types_base.py:2984 ms2.3%
AttribAccessDict.__init__mastodon/types_base.py:6394 ms2.3%
AttribAccessDict.__setitem__mastodon/types_base.py:7034 ms2.3%
get_type_hints<stdlib>/typing.py:24602 ms1.5%
_eval_type<stdlib>/typing.py:4752 ms1.5%
evaluate_forward_ref<stdlib>/typing.py:10521 ms0.8%
_make_forward_ref<stdlib>/typing.py:10041 ms0.8%
evaluate_forward_ref<stdlib>/typing.py:10581 ms0.8%
_eval_type<stdlib>/typing.py:4751 ms0.8%
evaluate_forward_ref<stdlib>/typing.py:10581 ms0.8%
get_type_hints<stdlib>/typing.py:24591 ms0.8%
_make_forward_ref<stdlib>/typing.py:10041 ms0.8%
ForwardRef.__forward_code__<stdlib>/annotationlib.py:3021 ms0.8%
MastodonVersionCheckTests.test_log_in_survives_instance_endpoint_rejecting_requestsmastodon_auth/tests.py:3166 ms3.8%
Mastodon.retrieve_mastodon_versionmastodon_auth/oauth.py:66 return super().retrieve_mastodon_version(fail_hard=fail_hard)6 ms3.8%
Mastodon.retrieve_mastodon_versionmastodon/utility.py:414 ms2.3%
Mastodon.__instancemastodon/instance.py:434 ms2.3%
Mastodon.__api_requestmastodon/internals.py:2784 ms2.3%
Mastodon.__try_cast_to_typemastodon/internals.py:1354 ms2.3%
try_cast_recursemastodon/types_base.py:4244 ms2.3%
try_castmastodon/types_base.py:2984 ms2.3%
AttribAccessDict.__init__mastodon/types_base.py:6394 ms2.3%
AttribAccessDict.__setitem__mastodon/types_base.py:7034 ms2.3%
get_type_hints<stdlib>/typing.py:24602 ms1.5%
_eval_type<stdlib>/typing.py:4752 ms1.5%
evaluate_forward_ref<stdlib>/typing.py:10521 ms0.8%
get_type_hints<stdlib>/typing.py:24681 ms0.8%
Mastodon.retrieve_mastodon_versionmastodon/utility.py:562 ms1.5%
Mastodon.__instance_v2mastodon/instance.py:632 ms1.5%
Mastodon.__api_requestmastodon/internals.py:2782 ms1.5%
Mastodon.__try_cast_to_typemastodon/internals.py:1352 ms1.5%
try_cast_recursemastodon/types_base.py:4242 ms1.5%
try_castmastodon/types_base.py:2982 ms1.5%
AttribAccessDict.__init__mastodon/types_base.py:6392 ms1.5%
AttribAccessDict.__setitem__mastodon/types_base.py:7032 ms1.5%
get_type_hints<stdlib>/typing.py:24602 ms1.5%
_eval_type<stdlib>/typing.py:4752 ms1.5%
evaluate_forward_ref<stdlib>/typing.py:10631 ms0.8%
evaluate_forward_ref<stdlib>/typing.py:10521 ms0.8%
_make_forward_ref<stdlib>/typing.py:10041 ms0.8%
MastodonVersionCheckTests.test_log_in_survives_instance_endpoint_rejecting_requestsmastodon_auth/tests.py:301 session = MagicMock()1 ms0.8%
MagicMixin.__init__<stdlib>/unittest/mock.py:21861 ms0.8%
MagicMixin._mock_set_magics<stdlib>/unittest/mock.py:22091 ms0.8%
teardown18 ms11.3%
Estimated from 134 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

mastodon_auth/oauth.py:66
return super().retrieve_mastodon_version(fail_hard=fail_hard)
Mastodon.retrieve_mastodon_version · Libraries
13 ms
mastodon_auth/tests.py:311
token = mastodon.log_in(
MastodonVersionCheckTests.test_log_in_survives_instance_endpoint_rejecting_requests · Libraries
4 ms
mastodon_auth/tests.py:301
session = MagicMock()
MastodonVersionCheckTests.test_log_in_survives_instance_endpoint_rejecting_requests · Mocking
1 ms

Fixtures

Exact setup time
_unittest_setUpClass_fixture_MastodonVersionCheckTests class 0.07 ms
_django_setup_unittest class 0.06 ms
_template_string_if_invalid_marker function 0.04 ms
_django_db_marker function 0.03 ms
_django_isolate_apps function 0.03 ms
_dj_autoclear_mailbox function 0.03 ms
_live_server_helper function 0.03 ms
_django_set_urlconf function 0.03 ms
_django_clear_site_cache function 0.02 ms
monkeypatch function 0.02 ms

Biggest pieces of work

call pytest internals 122 ms
call test body
mastodon_auth/tests.py:301
18 ms
teardown pytest internals 18 ms

Reliability

8 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 8 results, oldest first in the strip
When Environment Outcome Duration Commit
2 weeks ago CI github-actions:test passed 160 ms 28600ed main Profile
2 weeks, 5 days ago CI github-actions:test passed 113 ms 600b717 main Profile
2 weeks, 6 days ago CI github-actions:test passed 88 ms c28a326 main Profile
3 weeks ago CI github-actions:test passed 26 ms 9b8826a main Profile
3 weeks ago CI github-actions:test passed 77 ms 4f01055 main Profile
1 month ago CI github-actions:test passed 305 ms 8ab642e main Profile
1 month ago CI github-actions:test passed 665 ms 9b75244 main Profile
1 month ago CI github-actions:test passed 357 ms 9603516 main Profile