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
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, 7 hours ago ·
open run
setup13 ms20.6%
CallInfo.from_call_pytest/runner.py:36113 ms20.6%
call_and_report.<locals>.<lambda>_pytest/runner.py:25013 ms20.6%
HookCaller.__call__pluggy/_hooks.py:51213 ms20.6%
PluginManager._hookexecpluggy/_manager.py:12013 ms20.6%
_multicallpluggy/_callers.py:12113 ms20.6%
pytest_runtest_setup_pytest/runner.py:17013 ms20.6%
SetupState.setup_pytest/runner.py:53613 ms20.6%
TestCaseFunction.setup_pytest/unittest.py:24813 ms20.6%
Function.setup_pytest/python.py:171013 ms20.6%
TopRequest._fillfixtures_pytest/fixtures.py:80613 ms20.6%
FixtureRequest.getfixturevalue_pytest/fixtures.py:63013 ms20.6%
FixtureRequest._get_active_fixturedef_pytest/fixtures.py:72613 ms20.6%
FixtureDef.execute_pytest/fixtures.py:123213 ms20.6%
HookCaller.__call__pluggy/_hooks.py:51213 ms20.6%
PluginManager._hookexecpluggy/_manager.py:12013 ms20.6%
_multicallpluggy/_callers.py:12113 ms20.6%
pytest_fixture_setup_pytest/fixtures.py:132813 ms20.6%
call_fixture_func_pytest/fixtures.py:99813 ms20.6%
UnitTestCase._register_unittest_setup_class_fixture.<locals>.unittest_setup_class_fixture_pytest/unittest.py:15913 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%
CallInfo.from_call_pytest/runner.py:36151 ms79.0%
call_and_report.<locals>.<lambda>_pytest/runner.py:25051 ms79.0%
HookCaller.__call__pluggy/_hooks.py:51251 ms79.0%
PluginManager._hookexecpluggy/_manager.py:12051 ms79.0%
_multicallpluggy/_callers.py:12151 ms79.0%
pytest_runtest_call_pytest/runner.py:18451 ms79.0%
_django_setup_unittest.<locals>.non_debugging_runtestpytest_django/plugin.py:61451 ms79.0%
SimpleTestCase.__call__django/test/testcases.py:31451 ms79.0%
SimpleTestCase._setup_and_calldjango/test/testcases.py:36949 ms75.9%
TestCase.__call__<stdlib>/unittest/case.py:74749 ms75.9%
TestCase.run<stdlib>/unittest/case.py:69149 ms75.9%
TestCase._callTestMethod<stdlib>/unittest/case.py:63749 ms75.9%
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%
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%
_GeneratorContextManager.__exit__<stdlib>/contextlib.py:2101 ms1.5%
TestCase.subTest<stdlib>/unittest/case.py:5861 ms1.5%
_GeneratorContextManager.__exit__<stdlib>/contextlib.py:2101 ms1.5%
_Outcome.testPartExecutor<stdlib>/unittest/case.py:811 ms1.5%
TestCaseFunction.addSubTest_pytest/unittest.py:4631 ms1.5%
HookCaller.__call__pluggy/_hooks.py:5121 ms1.5%
PluginManager._hookexecpluggy/_manager.py:1201 ms1.5%
_multicallpluggy/_callers.py:1211 ms1.5%
WorkerInteractor.pytest_runtest_logreportxdist/remote.py:2821 ms1.5%
HookCaller.__call__pluggy/_hooks.py:5121 ms1.5%
PluginManager._hookexecpluggy/_manager.py:1201 ms1.5%
_multicallpluggy/_callers.py:1211 ms1.5%
pytest_report_to_serializable_pytest/subtests.py:3471 ms1.5%
SubtestReport._to_json_pytest/subtests.py:1001 ms1.5%
BaseReport._to_json_pytest/reports.py:2291 ms1.5%
_report_to_json_pytest/reports.py:6071 ms1.5%
ABCMeta.__instancecheck__<frozen abc>:1191 ms1.5%
SimpleTestCase._setup_and_calldjango/test/testcases.py:3601 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%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1001 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%
SimpleTestCase._setup_and_calldjango/test/testcases.py:3721 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
shown
.
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 msNo 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 failuresThis test hasn't failed recently.
History
Latest 50 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 7 hours ago | CI github-actions:test | passed | 65 ms | Profile |
| 7 hours ago | CI github-actions:test | passed | 195 ms | Profile |
| 7 hours ago | CI github-actions:test | passed | 155 ms | Profile |
| 12 hours ago | CI github-actions:test | passed | 159 ms | Profile |
| 13 hours ago | CI github-actions:test | passed | 61 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 47 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 72 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 74 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 70 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 75 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 69 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 70 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 69 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 70 ms | Run |
| 3 months, 4 weeks ago | CI github-actions | passed | 70 ms | Run |
| 3 months, 4 weeks ago | CI github-actions | passed | 87 ms | Run |
| 3 months, 4 weeks ago | CI github-actions | passed | 69 ms | Run |
| 3 months, 4 weeks ago | CI github-actions | passed | 69 ms | Run |
| 3 months, 4 weeks ago | CI github-actions | passed | 73 ms | Run |
| 3 months, 4 weeks ago | CI github-actions | passed | 68 ms | Run |