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

TestSyncAnnouncements::test_uses_one_of_the_message_variations

First seen 14 hours ago in 0c23747
CI github-actions:test 4 runs
Average
31 ms
median 32 ms
max 42 ms
Phases
Setup 3 ms Call 28 ms Teardown 0.32 ms
Categories
Database 24 ms Factories 2 ms Other (pytest, Libraries, Mocking, Unsampled) 6 ms

13 database queries per run

Needs 28 KB of memory (max 36 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 9 hours ago · open run
Show pytest frames
setup0.77 ms4.4%
call16 ms93.4%
TestSyncAnnouncements.test_uses_one_of_the_message_variationsconfs/tests.py:9659 ms54.5%
TestSyncAnnouncements._syncconfs/tests.py:937 call_command("syncannouncements")9 ms54.5%
call_commanddjango/core/management/__init__.py:1959 ms54.5%
RichCommand.executedjango_rich/management/__init__.py:349 ms54.5%
BaseCommand.executedjango/core/management/base.py:4669 ms54.5%
Command.handleconfs/management/commands/syncannouncements.py:13 sync_upcoming(Conference, Announcement, timezone.now().date())9 ms54.5%
sync_upcomingconfs/conference_announcements.py:107 for conference in upcoming:4 ms23.4%
QuerySet.__iter__django/db/models/query.py:4394 ms23.4%
QuerySet._fetch_alldjango/db/models/query.py:22624 ms23.4%
ModelIterable.__iter__django/db/models/query.py:1033 ms15.6%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16121 ms7.8%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7681 ms7.8%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:891 ms7.8%
SQLCompiler.setup_querydjango/db/models/sql/compiler.py:781 ms7.8%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:3101 ms7.8%
SQLCompiler.get_related_selectionsdjango/db/models/sql/compiler.py:12671 ms7.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16251 ms7.8%
CursorWrapper.executedjango/db/backends/utils.py:791 ms7.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms7.8%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms7.8%
Cursor.executepsycopg/cursor.py:1131 ms7.8%
Connection.waitpsycopg/connection.py:4951 ms7.8%
ModelIterable.__iter__django/db/models/query.py:1361 ms7.8%
Model.from_dbdjango/db/models/base.py:6251 ms7.8%
Model.__init__django/db/models/base.py:5141 ms7.8%
sync_upcomingconfs/conference_announcements.py:1084 ms23.4%
sync_conferenceconfs/conference_announcements.py:85 announcement = announcement_model.objects.create(3 ms15.6%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms15.6%
QuerySet.createdjango/db/models/query.py:7363 ms15.6%
Model.savedjango/db/models/base.py:9043 ms15.6%
Model.save_basedjango/db/models/base.py:9963 ms15.6%
Model._save_tabledjango/db/models/base.py:11993 ms15.6%
Model._do_insertdjango/db/models/base.py:12513 ms15.6%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms15.6%
QuerySet._insertdjango/db/models/query.py:21413 ms15.6%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19363 ms15.6%
CursorWrapper.executedjango/db/backends/utils.py:793 ms15.6%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms15.6%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms15.6%
Cursor.executepsycopg/cursor.py:1133 ms15.6%
Connection.waitpsycopg/connection.py:4953 ms15.6%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms7.8%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms7.8%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms7.8%
sync_conferenceconfs/conference_announcements.py:97 conference.save(update_fields=changed)1 ms7.8%
Model.savedjango/db/models/base.py:9041 ms7.8%
Model.save_basedjango/db/models/base.py:9961 ms7.8%
Model._save_tabledjango/db/models/base.py:11401 ms7.8%
Model._do_updatedjango/db/models/base.py:12441 ms7.8%
QuerySet._updatedjango/db/models/query.py:14481 ms7.8%
SQLUpdateCompiler.execute_returning_sqldjango/db/models/sql/compiler.py:21501 ms7.8%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:21211 ms7.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16251 ms7.8%
CursorWrapper.executedjango/db/backends/utils.py:791 ms7.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms7.8%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms7.8%
Cursor.executepsycopg/cursor.py:1131 ms7.8%
Connection.waitpsycopg/connection.py:4951 ms7.8%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms7.8%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms7.8%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms7.8%
CallableMixin.__call__<stdlib>/unittest/mock.py:11751 ms7.8%
CallableMixin._increment_mock_call<stdlib>/unittest/mock.py:11831 ms7.8%
NonCallableMock.__setattr__<stdlib>/unittest/mock.py:8091 ms7.8%
_delegating_property.<locals>._set<stdlib>/unittest/mock.py:3661 ms7.8%
TestSyncAnnouncements.test_uses_one_of_the_message_variationsconfs/tests.py:963 conference = self._conference()3 ms15.6%
TestSyncAnnouncements._conferenceconfs/tests.py:933 return baker.make(Conference, **defaults)3 ms15.6%
makemodel_bakery/baker.py:1753 ms15.6%
Baker.makemodel_bakery/baker.py:4543 ms15.6%
Baker._makemodel_bakery/baker.py:5423 ms15.6%
Baker.instancemodel_bakery/baker.py:6593 ms15.6%
Model.savedjango/db/models/base.py:9043 ms15.6%
Model.save_basedjango/db/models/base.py:9963 ms15.6%
Model._save_tabledjango/db/models/base.py:11993 ms15.6%
Model._do_insertdjango/db/models/base.py:12513 ms15.6%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms15.6%
QuerySet._insertdjango/db/models/query.py:21413 ms15.6%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19353 ms15.6%
SQLInsertCompiler.as_sqldjango/db/models/sql/compiler.py:18221 ms7.8%
SQLInsertCompiler.as_sqldjango/db/models/sql/compiler.py:18801 ms7.8%
SQLInsertCompiler.assemble_as_sqldjango/db/backends/postgresql/compiler.py:551 ms7.8%
SQLInsertCompiler.assemble_as_sqldjango/db/models/sql/compiler.py:17971 ms7.8%
TestSyncAnnouncements.test_uses_one_of_the_message_variationsconfs/tests.py:9701 ms7.8%
TestSyncAnnouncements.test_uses_one_of_the_message_variations.<locals>.<genexpr>confs/tests.py:970 self.assertTrue(any(lead in conference.start_announcement.content for lead in start_leads))1 ms7.8%
ForwardManyToOneDescriptor.__get__django/db/models/fields/related_descriptors.py:2661 ms7.8%
FetchOne.fetchdjango/db/models/fetch_modes.py:171 ms7.8%
ForwardManyToOneDescriptor.fetch_onedjango/db/models/fields/related_descriptors.py:2791 ms7.8%
ForwardOneToOneDescriptor.get_objectdjango/db/models/fields/related_descriptors.py:4091 ms7.8%
ForwardManyToOneDescriptor.get_objectdjango/db/models/fields/related_descriptors.py:2291 ms7.8%
ForwardManyToOneDescriptor.get_querysetdjango/db/models/fields/related_descriptors.py:1721 ms7.8%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms7.8%
TestSyncAnnouncements.test_uses_one_of_the_message_variationsconfs/tests.py:9711 ms7.8%
TestSyncAnnouncements.test_uses_one_of_the_message_variations.<locals>.<genexpr>confs/tests.py:971 self.assertTrue(any(lead in conference.end_announcement.content for lead in end_leads))1 ms7.8%
ForwardManyToOneDescriptor.__get__django/db/models/fields/related_descriptors.py:2661 ms7.8%
FetchOne.fetchdjango/db/models/fetch_modes.py:171 ms7.8%
ForwardManyToOneDescriptor.fetch_onedjango/db/models/fields/related_descriptors.py:2791 ms7.8%
ForwardOneToOneDescriptor.get_objectdjango/db/models/fields/related_descriptors.py:4091 ms7.8%
ForwardManyToOneDescriptor.get_objectdjango/db/models/fields/related_descriptors.py:2311 ms7.8%
QuerySet.getdjango/db/models/query.py:7021 ms7.8%
QuerySet.__len__django/db/models/query.py:4211 ms7.8%
QuerySet._fetch_alldjango/db/models/query.py:22621 ms7.8%
ModelIterable.__iter__django/db/models/query.py:1031 ms7.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16251 ms7.8%
CursorWrapper.executedjango/db/backends/utils.py:791 ms7.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms7.8%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms7.8%
Cursor.executepsycopg/cursor.py:1131 ms7.8%
Connection.waitpsycopg/connection.py:4951 ms7.8%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms7.8%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms7.8%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms7.8%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()1 ms7.8%
TestCase._fixture_teardowndjango/test/testcases.py:14981 ms7.8%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4951 ms7.8%
CursorWrapper.executedjango/db/backends/utils.py:791 ms7.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms7.8%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms7.8%
Cursor.executepsycopg/cursor.py:1131 ms7.8%
Connection.waitpsycopg/connection.py:4951 ms7.8%
teardown0.37 ms2.1%
Estimated from 14 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

confs/conference_announcements.py:107
for conference in upcoming:
sync_upcoming · Database
4 ms
confs/tests.py:933
return baker.make(Conference, **defaults)
TestSyncAnnouncements._conference · Database
3 ms
confs/conference_announcements.py:85
announcement = announcement_model.objects.create(
sync_conference · Database
3 ms
confs/management/commands/syncannouncements.py:13
sync_upcoming(Conference, Announcement, timezone.now().date())
Command.handle · Mocking
1 ms
confs/conference_announcements.py:97
conference.save(update_fields=changed)
sync_conference · Database
1 ms
confs/tests.py:970
self.assertTrue(any(lead in conference.start_announcement.content for lead in start_leads))
TestSyncAnnouncements.test_uses_one_of_the_message_variations.<locals>.<genexpr> · Database
1 ms
confs/tests.py:971
self.assertTrue(any(lead in conference.end_announcement.content for lead in end_leads))
TestSyncAnnouncements.test_uses_one_of_the_message_variations.<locals>.<genexpr> · Database
1 ms

Fixtures

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

Database

13 queries · 7 ms
No repeated queries.

Biggest pieces of work

call test body
confs/tests.py:963
15 ms
call _post_teardown
django/test/testcases.py:1243
1 ms
setup pytest internals 0.77 ms
teardown pytest internals 0.37 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
9 hours ago CI github-actions:test passed 17 ms d923a46 main Profile
9 hours ago CI github-actions:test passed 27 ms 82997f8 main Profile
9 hours ago CI github-actions:test passed 42 ms 623aa3e main Profile
14 hours ago CI github-actions:test passed 37 ms ab6465a main Profile
14 hours ago CI github-actions:test passed 12 ms 0c23747 main Run