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

TestSelectedInstance::test_selected_instance_slash_truncate

First seen 2 years, 11 months ago in 1cd3a8d
CI github-actions:test 11 runs
Average
150 ms
median 123 ms
max 269 ms
Phases
Setup 2 ms Call 148 ms Teardown 0.34 ms
Categories
Database 26 ms App code 0.47 ms Other (Libraries, Templates, Unsampled, pytest, ...) 123 ms

13 database queries per run

Needs 211 KB of memory (max 512 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 7 hours ago · open run
Show pytest frames
call120 ms98.1%
TestSelectedInstance.test_selected_instance_slash_truncateaccounts/tests.py:232 response = self.client.get("/?selected_instance=https://mastodon.social/")115 ms93.8%
Client.getdjango/test/client.py:1133115 ms93.8%
RequestFactory.getdjango/test/client.py:475115 ms93.8%
RequestFactory.genericdjango/test/client.py:671115 ms93.8%
Client.requestdjango/test/client.py:1091115 ms93.8%
ClientHandler.__call__django/test/client.py:173112 ms91.7%
BaseHandler.load_middlewaredjango/core/handlers/base.py:63112 ms91.7%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:104112 ms91.7%
WhiteNoise.add_fileswhitenoise/base.py:108112 ms91.7%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12099 ms81.0%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13199 ms81.0%
WhiteNoise.get_static_filewhitenoise/base.py:21786 ms70.4%
StaticFile.__init__whitenoise/responders.py:7247 ms38.4%
StaticFile.get_file_statswhitenoise/responders.py:16147 ms38.4%
__init____init__:-147 ms38.4%
FileEntry.__init__whitenoise/responders.py:26047 ms38.4%
<GC>~47 ms38.4%
StaticFile.__init__whitenoise/responders.py:7726 ms21.3%
StaticFile.get_alternativeswhitenoise/responders.py:20016 ms12.8%
__init____init__:-116 ms12.8%
Headers.__init__<stdlib>/wsgiref/headers.py:4316 ms12.8%
StaticFile.get_alternativeswhitenoise/responders.py:20110 ms8.5%
Headers.__setitem__<stdlib>/wsgiref/headers.py:6210 ms8.5%
Headers.__delitem__<stdlib>/wsgiref/headers.py:7110 ms8.5%
StaticFile.__init__whitenoise/responders.py:768 ms6.4%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1905 ms4.3%
Response.__init__whitenoise/responders.py:185 ms4.3%
<GC>~5 ms4.3%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1893 ms2.1%
Headers.__getitem__<stdlib>/wsgiref/headers.py:833 ms2.1%
Headers.get<stdlib>/wsgiref/headers.py:1063 ms2.1%
StaticFile.__init__whitenoise/responders.py:733 ms2.1%
StaticFile.get_headerswhitenoise/responders.py:1813 ms2.1%
Headers.__setitem__<stdlib>/wsgiref/headers.py:623 ms2.1%
Headers.__delitem__<stdlib>/wsgiref/headers.py:723 ms2.1%
WhiteNoise.get_static_filewhitenoise/base.py:2118 ms6.4%
WhiteNoise.add_mime_headerswhitenoise/base.py:2255 ms4.3%
MediaTypes.get_typewhitenoise/media_types.py:195 ms4.3%
splitext<frozen posixpath>:1265 ms4.3%
_splitext<frozen genericpath>:1755 ms4.3%
WhiteNoise.get_static_filewhitenoise/base.py:2125 ms4.3%
WhiteNoise.add_cache_headerswhitenoise/base.py:2335 ms4.3%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1765 ms4.3%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1975 ms4.3%
URLMixin.urldebug_toolbar/panels/staticfiles.py:205 ms4.3%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2353 ms2.1%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2143 ms2.1%
WhiteNoise.update_files_dictionarywhitenoise/base.py:11513 ms10.7%
scantreewhitenoise/base.py:27113 ms10.7%
scantreewhitenoise/base.py:27113 ms10.7%
scantreewhitenoise/base.py:2718 ms6.4%
scantreewhitenoise/base.py:2718 ms6.4%
scantreewhitenoise/base.py:2718 ms6.4%
scantreewhitenoise/base.py:2738 ms6.4%
scantreewhitenoise/base.py:2693 ms2.1%
scantreewhitenoise/base.py:2733 ms2.1%
ClientHandler.__call__django/test/client.py:1863 ms2.1%
BaseHandler.get_responsedjango/core/handlers/base.py:1423 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:563 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3803 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:563 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3823 ms2.1%
CSPMiddleware.process_responsecsp/middleware.py:833 ms2.1%
build_policycsp/utils.py:1243 ms2.1%
TestSelectedInstance.test_selected_instance_slash_truncateaccounts/tests.py:235 self.assertEqual(self.client.session["selected_instance"], "mastodon.social")3 ms2.1%
SessionBase.__getitem__django/contrib/sessions/backends/base.py:553 ms2.1%
SessionBase._get_sessiondjango/contrib/sessions/backends/base.py:2543 ms2.1%
SessionStore.loaddjango/contrib/sessions/backends/db.py:553 ms2.1%
SessionStore._get_session_from_dbdjango/contrib/sessions/backends/db.py:343 ms2.1%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms2.1%
QuerySet.getdjango/db/models/query.py:6923 ms2.1%
QuerySet.filterdjango/db/models/query.py:16763 ms2.1%
QuerySet._filter_or_excludedjango/db/models/query.py:16943 ms2.1%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:17043 ms2.1%
Query.add_qdjango/db/models/sql/query.py:16813 ms2.1%
TestSelectedInstance.test_selected_instance_slash_truncateaccounts/tests.py:241 self.assertContains(3 ms2.1%
SimpleTestCase.assertContainsdjango/test/testcases.py:6063 ms2.1%
SimpleTestCase._assert_containsdjango/test/testcases.py:5853 ms2.1%
Estimated from 46 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

accounts/tests.py:232
response = self.client.get("/?selected_instance=https://mastodon.social/")
TestSelectedInstance.test_selected_instance_slash_truncate · Libraries
115 ms
accounts/tests.py:235
self.assertEqual(self.client.session["selected_instance"], "mastodon.social")
TestSelectedInstance.test_selected_instance_slash_truncate · Database
3 ms
accounts/tests.py:241
self.assertContains(
TestSelectedInstance.test_selected_instance_slash_truncate · Libraries
3 ms

Fixtures

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

Database

13 queries · 6 ms
No repeated queries.

Biggest pieces of work

call test body
accounts/tests.py:232
120 ms

Reliability

12 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 12 results, oldest first in the strip
When Environment Outcome Duration Commit
7 hours ago CI github-actions:test passed 123 ms c28a326 main Profile
16 hours ago CI github-actions:test passed 69 ms 9b8826a main Profile
22 hours ago CI github-actions:test passed 133 ms 4f01055 main Profile
1 week, 5 days ago CI github-actions:test passed 243 ms 8ab642e main Profile
2 weeks, 2 days ago CI github-actions:test passed 95 ms 9b75244 main Profile
2 weeks, 2 days ago CI github-actions:test passed 119 ms 9603516 main Profile
2 weeks, 4 days ago CI github-actions:test passed 99 ms 615a272 main Profile
3 weeks ago CI github-actions:test passed 82 ms d923a46 main Profile
3 weeks ago CI github-actions:test passed 269 ms 82997f8 main Profile
3 weeks ago CI github-actions:test passed 204 ms 623aa3e main Profile
3 weeks ago CI github-actions:test passed 212 ms ab6465a main Profile
3 weeks ago CI github-actions:test passed 92 ms 0c23747 main Run