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

MastodonLoginFormTests::test_cleans_instance_to_ascii_hostname

First seen 5 months ago in b300f50
CI github-actions:test 4 runs
Average
143 ms
median 157 ms
max 195 ms
Phases
Setup 20 ms Call 123 ms Teardown 0.30 ms
Categories
Database 24 ms Other (Imports, pytest, Deep copies, Libraries, ...) 119 ms

5 database queries per run

Needs 12 MB of memory (max 13 MB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 6 hours ago · open run
Show pytest frames
setup13 ms20.6%
TestCase.setUpClassdjango/test/testcases.py:1426 cls.cls_atomics = cls._enter_atomics()13 ms20.6%
TestCase._enter_atomicsdjango/test/testcases.py:139913 ms20.6%
Atomic.__enter__django/db/transaction.py:21013 ms20.6%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:45413 ms20.6%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30413 ms20.6%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2613 ms20.6%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27913 ms20.6%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2613 ms20.6%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:25613 ms20.6%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2613 ms20.6%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:34513 ms20.6%
Connection.connectpsycopg/connection.py:10913 ms20.6%
wait_connpsycopg/waiting.py:1418 ms13.1%
EpollSelector.select<stdlib>/selectors.py:4528 ms13.1%
wait_connpsycopg/waiting.py:1455 ms7.5%
BaseConnection._connect_genpsycopg/_connection_base.py:4395 ms7.5%
call51 ms79.0%
MastodonLoginFormTests.test_cleans_instance_to_ascii_hostnamemastodon_auth/tests.py:99 self.assertTrue(form.is_valid())47 ms72.8%
BaseForm.is_validdjango/forms/forms.py:20647 ms72.8%
BaseForm.errorsdjango/forms/forms.py:20147 ms72.8%
BaseForm.full_cleandjango/forms/forms.py:33747 ms72.8%
BaseForm._clean_fieldsdjango/forms/forms.py:34746 ms71.3%
MastodonLoginForm.clean_instancemastodon_auth/forms.py:27 ascii_hostname = idna.encode(hostname, uts46=True).decode("ascii")46 ms71.3%
encodeidna/core.py:77243 ms66.6%
uts46_remapidna/core.py:67443 ms66.6%
_find_and_load<frozen importlib._bootstrap>:135043 ms66.6%
_find_and_load_unlocked<frozen importlib._bootstrap>:130943 ms66.6%
_load_unlocked<frozen importlib._bootstrap>:91543 ms66.6%
_LoaderBasics.exec_module<frozen importlib._bootstrap_external>:74343 ms66.6%
SourceLoader.get_code<frozen importlib._bootstrap_external>:87742 ms65.1%
SourceLoader.source_to_code<frozen importlib._bootstrap_external>:80642 ms65.1%
_call_with_frames_removed<frozen importlib._bootstrap>:54942 ms65.1%
SourceLoader.get_code<frozen importlib._bootstrap_external>:8871 ms1.5%
_code_to_timestamp_pyc<frozen importlib._bootstrap_external>:5171 ms1.5%
encodeidna/core.py:7863 ms4.6%
alabelidna/core.py:5503 ms4.6%
_punycodeidna/core.py:1343 ms4.6%
search_function<stdlib>/encodings/__init__.py:963 ms4.6%
_find_and_load<frozen importlib._bootstrap>:13503 ms4.6%
_find_and_load_unlocked<frozen importlib._bootstrap>:13093 ms4.6%
_load_unlocked<frozen importlib._bootstrap>:9153 ms4.6%
_LoaderBasics.exec_module<frozen importlib._bootstrap_external>:7432 ms3.1%
SourceLoader.get_code<frozen importlib._bootstrap_external>:8772 ms3.1%
SourceLoader.source_to_code<frozen importlib._bootstrap_external>:8062 ms3.1%
_call_with_frames_removed<frozen importlib._bootstrap>:5492 ms3.1%
_LoaderBasics.exec_module<frozen importlib._bootstrap_external>:7471 ms1.5%
_call_with_frames_removed<frozen importlib._bootstrap>:5491 ms1.5%
<module><stdlib>/encodings/punycode.py1 ms1.5%
SysMonitor.sysmon_py_startcoverage/sysmon.py:345 disp = self.should_trace(filename, frame) # type: ignore[arg-type]1 ms1.5%
Coverage._should_tracecoverage/control.py:4521 ms1.5%
InOrOut.should_tracecoverage/inorout.py:4391 ms1.5%
InOrOut.check_include_omit_etccoverage/inorout.py:4691 ms1.5%
TreeMatcher.matchcoverage/files.py:2751 ms1.5%
abs_filecoverage/files.py:1581 ms1.5%
realpath<frozen posixpath>:4601 ms1.5%
BaseForm._clean_fieldsdjango/forms/forms.py:3421 ms1.5%
BaseForm._bound_itemsdjango/forms/forms.py:1731 ms1.5%
BaseForm.__getitem__django/forms/forms.py:1941 ms1.5%
Field.get_bound_fielddjango/forms/fields.py:2611 ms1.5%
__init____init__:-11 ms1.5%
BoundField.__init__django/forms/boundfield.py:221 ms1.5%
TransactionTestCase._pre_setupdjango/test/testcases.py:1167 cls._fixture_setup()1 ms1.5%
TestCase._fixture_setupdjango/test/testcases.py:14811 ms1.5%
TestCase._enter_atomicsdjango/test/testcases.py:13991 ms1.5%
Atomic.__enter__django/db/transaction.py:2231 ms1.5%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:261 ms1.5%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4001 ms1.5%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3671 ms1.5%
CursorWrapper.executedjango/db/backends/utils.py:791 ms1.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms1.5%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms1.5%
Cursor.executepsycopg/cursor.py:1131 ms1.5%
Connection.waitpsycopg/connection.py:4951 ms1.5%
MastodonLoginFormTests.test_cleans_instance_to_ascii_hostnamemastodon_auth/tests.py:97 form = MastodonLoginForm(data={"instance": instance})1 ms1.5%
BaseForm.__init__django/forms/forms.py:1061 ms1.5%
deepcopy<stdlib>/copy.py:1311 ms1.5%
_deepcopy_dict<stdlib>/copy.py:2021 ms1.5%
deepcopy<stdlib>/copy.py:1381 ms1.5%
Field.__deepcopy__django/forms/fields.py:2641 ms1.5%
copy<stdlib>/copy.py:901 ms1.5%
MastodonLoginFormTests.test_cleans_instance_to_ascii_hostnamemastodon_auth/tests.py:96 with self.subTest(instance=instance):1 ms1.5%
ABCMeta.__instancecheck__<frozen abc>:1191 ms1.5%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()1 ms1.5%
TestCase._fixture_teardowndjango/test/testcases.py:14971 ms1.5%
TestCase._should_check_constraintsdjango/test/testcases.py:15061 ms1.5%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:5041 ms1.5%
Cursor.executepsycopg/cursor.py:1131 ms1.5%
Connection.waitpsycopg/connection.py:4951 ms1.5%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms1.5%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms1.5%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms1.5%
Estimated from 62 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

mastodon_auth/forms.py:27
ascii_hostname = idna.encode(hostname, uts46=True).decode("ascii")
MastodonLoginForm.clean_instance · Imports
46 ms
mastodon_auth/tests.py:97
form = MastodonLoginForm(data={"instance": instance})
MastodonLoginFormTests.test_cleans_instance_to_ascii_hostname · Deep copies
1 ms
mastodon_auth/tests.py:99
self.assertTrue(form.is_valid())
MastodonLoginFormTests.test_cleans_instance_to_ascii_hostname · Libraries
1 ms
mastodon_auth/tests.py:96
with self.subTest(instance=instance):
MastodonLoginFormTests.test_cleans_instance_to_ascii_hostname · Libraries
1 ms

Fixtures

Exact setup time
_unittest_setUpClass_fixture_MastodonLoginFormTests class 12 ms
_django_setup_unittest class 0.25 ms
_live_server_helper function 0.13 ms
_template_string_if_invalid_marker function 0.05 ms
_dj_autoclear_mailbox function 0.04 ms
_django_db_marker function 0.04 ms
_django_isolate_apps function 0.03 ms
_django_set_urlconf function 0.03 ms
_django_clear_site_cache function 0.03 ms
monkeypatch function 0.02 ms

Database

5 queries · 0.95 ms
No repeated queries.

Biggest pieces of work

call test body
mastodon_auth/tests.py:99
49 ms
setup setUpClass
django/test/testcases.py:1426
13 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 50 results, oldest first in the strip
When Environment Outcome Duration Commit
6 hours ago CI github-actions:test passed 65 ms d923a46 main Profile
6 hours ago CI github-actions:test passed 195 ms 82997f8 main Profile
7 hours ago CI github-actions:test passed 155 ms 623aa3e main Profile
11 hours ago CI github-actions:test passed 159 ms ab6465a main Profile
12 hours ago CI github-actions:test passed 61 ms 0c23747 main Run
3 months, 3 weeks ago CI github-actions passed 47 ms 69d78ea HEAD Run
3 months, 3 weeks ago CI github-actions passed 72 ms 8fac7b5 main Run
3 months, 3 weeks ago CI github-actions passed 74 ms 36b9579 main Run
3 months, 3 weeks ago CI github-actions passed 70 ms 553d048 main Run
3 months, 3 weeks ago CI github-actions passed 75 ms 8eb0f44 HEAD Run
3 months, 3 weeks ago CI github-actions passed 69 ms e0fb3ac HEAD Run
3 months, 3 weeks ago CI github-actions passed 70 ms a849b58 HEAD Run
3 months, 3 weeks ago CI github-actions passed 69 ms 6418e05 HEAD Run
3 months, 3 weeks ago CI github-actions passed 70 ms 5b9b309 main Run
3 months, 4 weeks ago CI github-actions passed 70 ms 1f2c5a6 main Run
3 months, 4 weeks ago CI github-actions passed 87 ms 5ec7fa8 main Run
3 months, 4 weeks ago CI github-actions passed 69 ms 1e42064 main Run
3 months, 4 weeks ago CI github-actions passed 69 ms fcb1b79 main Run
3 months, 4 weeks ago CI github-actions passed 73 ms 1460ac2 HEAD Run
3 months, 4 weeks ago CI github-actions passed 68 ms 8129f09 HEAD Run