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

TestPostAnnouncements::test_skips_when_token_missing

First seen 15 hours ago in 0c23747
CI github-actions:test 4 runs
Average
28 ms
median 28 ms
max 41 ms
Phases
Setup 3 ms Call 22 ms Teardown 3 ms
Categories
Database 17 ms Other (Mocking, pytest, Libraries, Unsampled) 10 ms

8 database queries per run

Needs 67 KB of memory (max 88 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 10 hours ago · open run
Hide pytest frames
call10 ms69.9%
CallInfo.from_call_pytest/runner.py:36110 ms69.9%
call_and_report.<locals>.<lambda>_pytest/runner.py:25010 ms69.9%
HookCaller.__call__pluggy/_hooks.py:51210 ms69.9%
PluginManager._hookexecpluggy/_manager.py:12010 ms69.9%
_multicallpluggy/_callers.py:12110 ms69.9%
pytest_runtest_call_pytest/runner.py:18410 ms69.9%
_django_setup_unittest.<locals>.non_debugging_runtestpytest_django/plugin.py:61410 ms69.9%
SimpleTestCase.__call__django/test/testcases.py:31410 ms69.9%
SimpleTestCase._setup_and_calldjango/test/testcases.py:3697 ms52.5%
TestCase.__call__<stdlib>/unittest/case.py:7477 ms52.5%
TestCase.run<stdlib>/unittest/case.py:6917 ms52.5%
TestCase._callTestMethod<stdlib>/unittest/case.py:6377 ms52.5%
TestContextDecorator.decorate_callable.<locals>.innerdjango/test/utils.py:4717 ms52.5%
TestPostAnnouncements.test_skips_when_token_missingannouncements/tests.py:92 status_post = self._run_at(dt.datetime(2026, 6, 1, 9, 0, tzinfo=dt.UTC))7 ms52.5%
TestPostAnnouncements._run_atannouncements/tests.py:37 client = mastodon_cls.return_value6 ms43.7%
NonCallableMock.__get_return_value<stdlib>/unittest/mock.py:5846 ms43.7%
NonCallableMock._get_child_mock<stdlib>/unittest/mock.py:10976 ms43.7%
MagicMixin.__init__<stdlib>/unittest/mock.py:21825 ms35.0%
MagicMixin._mock_set_magics<stdlib>/unittest/mock.py:22055 ms35.0%
__init____init__:-15 ms35.0%
MagicProxy.__init__<stdlib>/unittest/mock.py:22595 ms35.0%
<GC>~5 ms35.0%
MagicMixin.__init__<stdlib>/unittest/mock.py:21841 ms8.7%
MagicMixin._mock_set_magics<stdlib>/unittest/mock.py:21881 ms8.7%
TestPostAnnouncements._run_atannouncements/tests.py:34 mock.patch("announcements.management.commands.postannouncements.timezone.now", return_value=moment),1 ms8.7%
_patch.__enter__<stdlib>/unittest/mock.py:15681 ms8.7%
NonCallableMock.__new__<stdlib>/unittest/mock.py:4601 ms8.7%
SimpleTestCase._setup_and_calldjango/test/testcases.py:3601 ms8.7%
TransactionTestCase._pre_setupdjango/test/testcases.py:1167 cls._fixture_setup()1 ms8.7%
TestCase._fixture_setupdjango/test/testcases.py:14811 ms8.7%
TestCase._enter_atomicsdjango/test/testcases.py:13991 ms8.7%
Atomic.__enter__django/db/transaction.py:2231 ms8.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:261 ms8.7%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4001 ms8.7%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3671 ms8.7%
CursorWrapper.executedjango/db/backends/utils.py:791 ms8.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms8.7%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1001 ms8.7%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms8.7%
Cursor.executepsycopg/cursor.py:1131 ms8.7%
Connection.waitpsycopg/connection.py:4951 ms8.7%
SimpleTestCase._setup_and_calldjango/test/testcases.py:3721 ms8.7%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()1 ms8.7%
TestCase._fixture_teardowndjango/test/testcases.py:14971 ms8.7%
TestCase._should_check_constraintsdjango/test/testcases.py:15061 ms8.7%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:5041 ms8.7%
Cursor.executepsycopg/cursor.py:1131 ms8.7%
Connection.waitpsycopg/connection.py:4951 ms8.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms8.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms8.7%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms8.7%
teardown4 ms25.5%
CallInfo.from_call_pytest/runner.py:3614 ms25.5%
call_and_report.<locals>.<lambda>_pytest/runner.py:2504 ms25.5%
HookCaller.__call__pluggy/_hooks.py:5124 ms25.5%
PluginManager._hookexecpluggy/_manager.py:1204 ms25.5%
_multicallpluggy/_callers.py:1214 ms25.5%
pytest_runtest_teardown_pytest/runner.py:1994 ms25.5%
SetupState.teardown_exact_pytest/runner.py:5684 ms25.5%
FixtureDef.finish_pytest/fixtures.py:11564 ms25.5%
_teardown_yield_fixture_pytest/fixtures.py:10144 ms25.5%
UnitTestCase._register_unittest_setup_class_fixture.<locals>.unittest_setup_class_fixture_pytest/unittest.py:1694 ms25.5%
TestCase.tearDownClassdjango/test/testcases.py:1458 conn.close()4 ms25.5%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:264 ms25.5%
BaseDatabaseWrapper.closedjango/db/backends/base/base.py:3554 ms25.5%
DatabaseWrapper._closedjango/db/backends/postgresql/base.py:4084 ms25.5%
Connection.closepsycopg/connection.py:2014 ms25.5%
Estimated from 11 samples; phase durations are exact. Frames from pytest and pluggy are shown .

Hot lines in your code

announcements/tests.py:37
client = mastodon_cls.return_value
TestPostAnnouncements._run_at · Mocking
6 ms
announcements/tests.py:34
mock.patch("announcements.management.commands.postannouncements.timezone.now", return_value=moment),
TestPostAnnouncements._run_at · Mocking
1 ms

Fixtures

Exact setup time
_django_clear_site_cache function 0.04 ms
_dj_autoclear_mailbox function 0.03 ms
_template_string_if_invalid_marker function 0.03 ms
_django_db_marker function 0.03 ms
_django_isolate_apps function 0.03 ms
_live_server_helper function 0.03 ms
_django_set_urlconf function 0.02 ms
monkeypatch function 0.02 ms

Database

8 queries · 2 ms
No repeated queries.

Biggest pieces of work

call test body
announcements/tests.py:92
7 ms
teardown tearDownClass
django/test/testcases.py:1458
4 ms
call _pre_setup
django/test/testcases.py:1167
1 ms
call _post_teardown
django/test/testcases.py:1243
1 ms

Reliability

5 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 5 results, oldest first in the strip
When Environment Outcome Duration Commit
10 hours ago CI github-actions:test passed 14 ms d923a46 main Profile
10 hours ago CI github-actions:test passed 22 ms 82997f8 main Profile
10 hours ago CI github-actions:test passed 33 ms 623aa3e main Profile
15 hours ago CI github-actions:test passed 41 ms ab6465a main Profile
15 hours ago CI github-actions:test passed 7 ms 0c23747 main Run