flakytest.dev anze3db flakytest
Tests / apps/guides/tests.py

TestGuidePages::test_guide

First seen 2 weeks, 2 days ago in b3fedae
CI github-actions:test 6 runs
Average
46 ms
median 47 ms
max 66 ms
Phases
Setup 0.63 ms Call 46 ms Teardown 0.15 ms
Categories
Database 3 ms Other (Libraries, Templates, Unsampled, pytest) 44 ms

5 database queries per run

Needs 0 KB of memory (max 0 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 16 hours ago · open run
Show pytest frames
call58 ms98.5%
TestGuidePages.test_guideapps/guides/tests.py:115 self.assertContains(response, f"<h1>{guide.title}</h1>", html=True)24 ms40.1%
SimpleTestCase.assertContainsdjango/test/testcases.py:60324 ms40.1%
SimpleTestCase._assert_containsdjango/test/testcases.py:58424 ms40.1%
assert_and_parse_htmldjango/test/testcases.py:9524 ms40.1%
parse_htmldjango/test/html.py:26624 ms40.1%
HTMLParser.feed<stdlib>/html/parser.py:18724 ms40.1%
HTMLParser.goahead<stdlib>/html/parser.py:27113 ms21.9%
Parser.handle_datadjango/test/html.py:25511 ms18.2%
HTMLParser.goahead<stdlib>/html/parser.py:2799 ms14.6%
HTMLParser.parse_starttag<stdlib>/html/parser.py:4882 ms3.6%
HTMLParser.parse_starttag<stdlib>/html/parser.py:4952 ms3.6%
HTMLParser.goahead<stdlib>/html/parser.py:2812 ms3.6%
HTMLParser.parse_endtag<stdlib>/html/parser.py:5202 ms3.6%
TestGuidePages.test_guideapps/guides/tests.py:113 response = self.client.get(guide.url)24 ms40.1%
Client.getdjango/test/client.py:112424 ms40.1%
RequestFactory.getdjango/test/client.py:47524 ms40.1%
RequestFactory.genericdjango/test/client.py:67124 ms40.1%
Client.requestdjango/test/client.py:108224 ms40.1%
ClientHandler.__call__django/test/client.py:17317 ms29.2%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6217 ms29.2%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10417 ms29.2%
WhiteNoise.add_fileswhitenoise/base.py:10817 ms29.2%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12013 ms21.9%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13113 ms21.9%
WhiteNoise.get_static_filewhitenoise/base.py:20811 ms18.2%
StaticFile.__init__whitenoise/responders.py:724 ms7.3%
StaticFile.get_file_statswhitenoise/responders.py:1612 ms3.6%
StaticFile.__init__whitenoise/responders.py:762 ms3.6%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1882 ms3.6%
StaticFile.__init__whitenoise/responders.py:732 ms3.6%
StaticFile.get_headerswhitenoise/responders.py:1672 ms3.6%
WhiteNoise.get_static_filewhitenoise/base.py:2032 ms3.6%
WhiteNoise.add_cache_headerswhitenoise/base.py:2242 ms3.6%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1762 ms3.6%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1972 ms3.6%
URLMixin.urldebug_toolbar/panels/staticfiles.py:202 ms3.6%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2052 ms3.6%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:1862 ms3.6%
FileSystemStorage.urldjango/core/files/storage/filesystem.py:2092 ms3.6%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1154 ms7.3%
scantreewhitenoise/base.py:2622 ms3.6%
scantreewhitenoise/base.py:2622 ms3.6%
scantreewhitenoise/base.py:2642 ms3.6%
ClientHandler.__call__django/test/client.py:1866 ms10.9%
BaseHandler.get_responsedjango/core/handlers/base.py:1416 ms10.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms10.9%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1306 ms10.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms10.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms10.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms10.9%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1236 ms10.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms10.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms10.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms10.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms10.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms10.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms10.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms10.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms10.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms10.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms10.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms10.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms10.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms10.9%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:346 ms10.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms10.9%
BaseHandler._get_responsedjango/core/handlers/base.py:1954 ms7.3%
iscoroutinefunction<stdlib>/inspect.py:336 return _has_code_flag(obj, CO_COROUTINE) or _has_coroutine_mark(obj)2 ms3.6%
make_middleware_decorator.<locals>._make_decorator.<locals>._decorator.<locals>._view_wrapperdjango/utils/decorators.py:1852 ms3.6%
make_middleware_decorator.<locals>._make_decorator.<locals>._decorator.<locals>._pre_process_requestdjango/utils/decorators.py:1312 ms3.6%
FetchFromCacheMiddleware.process_requestdjango/middleware/cache.py:1702 ms3.6%
get_cache_keydjango/utils/cache.py:3902 ms3.6%
_generate_cache_header_keydjango/utils/cache.py:3752 ms3.6%
_i18n_cache_key_suffixdjango/utils/cache.py:3452 ms3.6%
get_languagedjango/utils/translation/__init__.py:2112 ms3.6%
BaseHandler._get_responsedjango/core/handlers/base.py:1982 ms3.6%
make_middleware_decorator.<locals>._make_decorator.<locals>._decorator.<locals>._view_wrapperdjango/utils/decorators.py:1902 ms3.6%
vary_on_headers.<locals>.decorator.<locals>._view_wrapperdjango/views/decorators/vary.py:312 ms3.6%
guideapps/guides/views.py:41 return render(2 ms3.6%
renderdjango/shortcuts.py:252 ms3.6%
render_to_stringdjango/template/loader.py:622 ms3.6%
Template.renderdjango/template/backends/django.py:1072 ms3.6%
Template.renderdjango/template/base.py:1742 ms3.6%
instrumented_test_renderdjango/test/utils.py:1142 ms3.6%
NodeList.renderdjango/template/base.py:10912 ms3.6%
Node.render_annotateddjango/template/base.py:10522 ms3.6%
ExtendsNode.renderdjango/template/loader_tags.py:1602 ms3.6%
instrumented_test_renderdjango/test/utils.py:1142 ms3.6%
NodeList.renderdjango/template/base.py:10912 ms3.6%
Node.render_annotateddjango/template/base.py:10522 ms3.6%
ExtendsNode.renderdjango/template/loader_tags.py:1522 ms3.6%
NodeList.get_nodes_by_typedjango/template/base.py:10972 ms3.6%
TestGuidePages.test_guideapps/guides/tests.py:116 self.assertContains(response, f'<link rel="canonical" href="{SITE_URL}{guide.url}">', html=True)6 ms10.9%
SimpleTestCase.assertContainsdjango/test/testcases.py:6036 ms10.9%
SimpleTestCase._assert_containsdjango/test/testcases.py:5846 ms10.9%
assert_and_parse_htmldjango/test/testcases.py:956 ms10.9%
parse_htmldjango/test/html.py:2666 ms10.9%
HTMLParser.feed<stdlib>/html/parser.py:1876 ms10.9%
HTMLParser.goahead<stdlib>/html/parser.py:2794 ms7.3%
HTMLParser.parse_starttag<stdlib>/html/parser.py:4732 ms3.6%
HTMLParser.parse_starttag<stdlib>/html/parser.py:4952 ms3.6%
Parser.handle_starttagdjango/test/html.py:2412 ms3.6%
Element.__eq__django/test/html.py:1132 ms3.6%
HTMLParser.goahead<stdlib>/html/parser.py:2712 ms3.6%
Parser.handle_datadjango/test/html.py:2552 ms3.6%
TestGuidePages.test_guideapps/guides/tests.py:119 self.assertContains(response, 'class="codehilite"')2 ms3.6%
SimpleTestCase.assertContainsdjango/test/testcases.py:6032 ms3.6%
SimpleTestCase._assert_containsdjango/test/testcases.py:5822 ms3.6%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()2 ms3.6%
TestCase._fixture_teardowndjango/test/testcases.py:14972 ms3.6%
TestCase._rollback_atomicsdjango/test/testcases.py:14052 ms3.6%
Atomic.__exit__django/db/transaction.py:2832 ms3.6%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms3.6%
BaseDatabaseWrapper.savepoint_rollbackdjango/db/backends/base/base.py:4132 ms3.6%
BaseDatabaseWrapper._savepoint_rollbackdjango/db/backends/base/base.py:3712 ms3.6%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.6%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.6%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms3.6%
Cursor.executepsycopg/cursor.py:1132 ms3.6%
Connection.waitpsycopg/connection.py:4952 ms3.6%
Estimated from 27 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

apps/guides/tests.py:115
self.assertContains(response, f"<h1>{guide.title}</h1>", html=True)
TestGuidePages.test_guide · Libraries
24 ms
apps/guides/tests.py:113
response = self.client.get(guide.url)
TestGuidePages.test_guide · Libraries
21 ms
apps/guides/tests.py:116
self.assertContains(response, f'<link rel="canonical" href="{SITE_URL}{guide.url}">', html=True)
TestGuidePages.test_guide · Libraries
6 ms
apps/guides/views.py:41
return render(
guide · Templates
2 ms
apps/guides/tests.py:119
self.assertContains(response, 'class="codehilite"')
TestGuidePages.test_guide · Libraries
2 ms

Fixtures

Exact setup time
_template_string_if_invalid_marker function 0.09 ms
_dj_autoclear_mailbox function 0.05 ms
_django_db_marker function 0.03 ms
_django_clear_site_cache function 0.03 ms
_django_set_urlconf function 0.03 ms
_live_server_helper function 0.03 ms
monkeypatch function 0.02 ms

Database

5 queries · 0.76 ms
No repeated queries.

Biggest pieces of work

call test body
apps/guides/tests.py:115
56 ms
call _post_teardown
django/test/testcases.py:1240
2 ms

Reliability

6 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 6 results, oldest first in the strip
When Environment Outcome Duration Commit
16 hours ago CI github-actions:test passed 59 ms e141198 main Profile
1 week, 5 days ago CI github-actions:test passed 26 ms 46ec2aa main Profile
2 weeks, 1 day ago CI github-actions:test passed 55 ms afde85b main Profile
2 weeks, 1 day ago CI github-actions:test passed 39 ms fe29f9d main Profile
2 weeks, 1 day ago CI github-actions:test passed 66 ms 044719a main Profile
2 weeks, 2 days ago CI github-actions:test passed 34 ms b3fedae main Profile