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

TestPostAnnouncements::test_respects_visibility

First seen 15 hours ago in 0c23747
CI github-actions:test 4 runs
Average
15 ms
median 15 ms
max 20 ms
Phases
Setup 1 ms Call 14 ms Teardown 0.25 ms
Categories
Database 13 ms Other (Unsampled, pytest, Libraries) 2 ms

10 database queries per run

Needs 46 KB of memory (max 72 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 10 hours ago · open run
Hide pytest frames
setup2 ms13.9%
CallInfo.from_call_pytest/runner.py:3612 ms13.9%
call_and_report.<locals>.<lambda>_pytest/runner.py:2502 ms13.9%
HookCaller.__call__pluggy/_hooks.py:5122 ms13.9%
PluginManager._hookexecpluggy/_manager.py:1202 ms13.9%
_multicallpluggy/_callers.py:1212 ms13.9%
pytest_runtest_setup_pytest/runner.py:1702 ms13.9%
SetupState.setup_pytest/runner.py:5362 ms13.9%
TestCaseFunction.setup_pytest/unittest.py:2482 ms13.9%
Function.setup_pytest/python.py:17102 ms13.9%
TopRequest._fillfixtures_pytest/fixtures.py:8062 ms13.9%
FixtureRequest.getfixturevalue_pytest/fixtures.py:6302 ms13.9%
FixtureRequest._get_active_fixturedef_pytest/fixtures.py:7112 ms13.9%
SubRequest.__init___pytest/fixtures.py:8272 ms13.9%
FixtureRequest.__init___pytest/fixtures.py:4562 ms13.9%
call9 ms84.4%
CallInfo.from_call_pytest/runner.py:3619 ms84.4%
call_and_report.<locals>.<lambda>_pytest/runner.py:2509 ms84.4%
HookCaller.__call__pluggy/_hooks.py:5129 ms84.4%
PluginManager._hookexecpluggy/_manager.py:1209 ms84.4%
_multicallpluggy/_callers.py:1219 ms84.4%
pytest_runtest_call_pytest/runner.py:1849 ms84.4%
_django_setup_unittest.<locals>.non_debugging_runtestpytest_django/plugin.py:6149 ms84.4%
SimpleTestCase.__call__django/test/testcases.py:3149 ms84.4%
SimpleTestCase._setup_and_calldjango/test/testcases.py:3698 ms67.5%
TestCase.__call__<stdlib>/unittest/case.py:7478 ms67.5%
TestCase.run<stdlib>/unittest/case.py:6916 ms50.6%
TestCase._callTestMethod<stdlib>/unittest/case.py:6376 ms50.6%
TestPostAnnouncements.test_respects_visibilityannouncements/tests.py:67 status_post = self._run_at(dt.datetime(2026, 6, 1, 9, 0, tzinfo=dt.UTC))6 ms50.6%
TestPostAnnouncements._run_atannouncements/tests.py:42 call_command("postannouncements", *([] if dry_run else ["--no-dry-run"]))6 ms50.6%
call_commanddjango/core/management/__init__.py:1956 ms50.6%
RichCommand.executedjango_rich/management/__init__.py:346 ms50.6%
BaseCommand.executedjango/core/management/base.py:4666 ms50.6%
Command.handleannouncements/management/commands/postannouncements.py:64 announcement.save(update_fields=["posted_at", "post_url", "error"])4 ms33.8%
Model.savedjango/db/models/base.py:9044 ms33.8%
Model.save_basedjango/db/models/base.py:9964 ms33.8%
Model._save_tabledjango/db/models/base.py:11404 ms33.8%
Model._do_updatedjango/db/models/base.py:12212 ms16.9%
QuerySet.filterdjango/db/models/query.py:16762 ms16.9%
QuerySet._filter_or_excludedjango/db/models/query.py:16942 ms16.9%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:17042 ms16.9%
Query.add_qdjango/db/models/sql/query.py:16812 ms16.9%
Query._add_qdjango/db/models/sql/query.py:17132 ms16.9%
Query.build_filterdjango/db/models/sql/query.py:15772 ms16.9%
Query.setup_joinsdjango/db/models/sql/query.py:19422 ms16.9%
Query.names_to_pathdjango/db/models/sql/query.py:17942 ms16.9%
Model._do_updatedjango/db/models/base.py:12442 ms16.9%
QuerySet._updatedjango/db/models/query.py:14482 ms16.9%
SQLUpdateCompiler.execute_returning_sqldjango/db/models/sql/compiler.py:21502 ms16.9%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:21212 ms16.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16232 ms16.9%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms16.9%
BaseDatabaseWrapper.cursordjango/db/backends/base/base.py:3202 ms16.9%
BaseDatabaseWrapper._cursordjango/db/backends/base/base.py:2982 ms16.9%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms16.9%
DatabaseWrapper.create_cursordjango/db/backends/postgresql/base.py:4422 ms16.9%
Connection.cursorpsycopg/connection.py:2592 ms16.9%
Cursor.__init__psycopg/cursor.py:472 ms16.9%
BaseCursor.__init__psycopg/_cursor_base.py:652 ms16.9%
Command.handleannouncements/management/commands/postannouncements.py:26 due = list(Announcement.objects.filter(posted_at__isnull=True, post_at__lte=timezone.now()))2 ms16.9%
QuerySet.__iter__django/db/models/query.py:4392 ms16.9%
QuerySet._fetch_alldjango/db/models/query.py:22622 ms16.9%
ModelIterable.__iter__django/db/models/query.py:1032 ms16.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16252 ms16.9%
CursorWrapper.executedjango/db/backends/utils.py:792 ms16.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms16.9%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms16.9%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms16.9%
Cursor.executepsycopg/cursor.py:1132 ms16.9%
Connection.waitpsycopg/connection.py:4952 ms16.9%
BaseCursor._execute_genpsycopg/_cursor_base.py:2052 ms16.9%
BaseCursor._convert_querypsycopg/_cursor_base.py:4652 ms16.9%
TestCase.run<stdlib>/unittest/case.py:6872 ms16.9%
TestCase._callSetUp<stdlib>/unittest/case.py:6342 ms16.9%
TestPostAnnouncements.setUpannouncements/tests.py:18 self.due = baker.make(2 ms16.9%
makemodel_bakery/baker.py:1752 ms16.9%
Baker.makemodel_bakery/baker.py:4542 ms16.9%
Baker._makemodel_bakery/baker.py:5422 ms16.9%
Baker.instancemodel_bakery/baker.py:6592 ms16.9%
Model.savedjango/db/models/base.py:9042 ms16.9%
Model.save_basedjango/db/models/base.py:9962 ms16.9%
Model._save_tabledjango/db/models/base.py:11992 ms16.9%
Model._do_insertdjango/db/models/base.py:12512 ms16.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms16.9%
QuerySet._insertdjango/db/models/query.py:21412 ms16.9%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19362 ms16.9%
CursorWrapper.executedjango/db/backends/utils.py:792 ms16.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms16.9%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms16.9%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms16.9%
Cursor.executepsycopg/cursor.py:1132 ms16.9%
Connection.waitpsycopg/connection.py:4952 ms16.9%
SimpleTestCase._setup_and_calldjango/test/testcases.py:3602 ms16.9%
TransactionTestCase._pre_setupdjango/test/testcases.py:1167 cls._fixture_setup()2 ms16.9%
TestCase._fixture_setupdjango/test/testcases.py:14812 ms16.9%
TestCase._enter_atomicsdjango/test/testcases.py:13992 ms16.9%
Atomic.__enter__django/db/transaction.py:2232 ms16.9%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms16.9%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4002 ms16.9%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3672 ms16.9%
CursorWrapper.executedjango/db/backends/utils.py:792 ms16.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms16.9%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms16.9%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms16.9%
Cursor.executepsycopg/cursor.py:1132 ms16.9%
Connection.waitpsycopg/connection.py:4952 ms16.9%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms16.9%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms16.9%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms16.9%
Estimated from 6 samples; phase durations are exact. Frames from pytest and pluggy are shown .

Hot lines in your code

announcements/management/commands/postannouncements.py:64
announcement.save(update_fields=["posted_at", "post_url", "error"])
Command.handle · Database
4 ms
announcements/tests.py:18
self.due = baker.make(
TestPostAnnouncements.setUp · Database
2 ms
announcements/management/commands/postannouncements.py:26
due = list(Announcement.objects.filter(posted_at__isnull=True, post_at__lte=timezone.now()))
Command.handle · Database
2 ms

Fixtures

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

Database

10 queries · 4 ms
No repeated queries.

Biggest pieces of work

call test body
announcements/tests.py:67
6 ms
call _pre_setup
django/test/testcases.py:1167
2 ms
call setUp
announcements/tests.py:18
2 ms
setup pytest internals 2 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 11 ms d923a46 main Profile
10 hours ago CI github-actions:test passed 15 ms 82997f8 main Profile
10 hours ago CI github-actions:test passed 15 ms 623aa3e main Profile
15 hours ago CI github-actions:test passed 20 ms ab6465a main Profile
15 hours ago CI github-actions:test passed 9 ms 0c23747 main Run