id
int64
0
458k
file_name
stringlengths
4
119
file_path
stringlengths
14
227
content
stringlengths
24
9.96M
size
int64
24
9.96M
language
stringclasses
1 value
extension
stringclasses
14 values
total_lines
int64
1
219k
avg_line_length
float64
2.52
4.63M
max_line_length
int64
5
9.91M
alphanum_fraction
float64
0
1
repo_name
stringlengths
7
101
repo_stars
int64
100
139k
repo_forks
int64
0
26.4k
repo_open_issues
int64
0
2.27k
repo_license
stringclasses
12 values
repo_extraction_date
stringclasses
433 values
13,800
__init__.py
ansible_ansible/test/units/utils/collection_loader/fixtures/collections_masked/ansible_collections/testns/__init__.py
from __future__ import annotations # pragma: nocover raise Exception('this code should never execute') # pragma: nocover
125
Python
.py
2
60.5
68
0.768595
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,801
__init__.py
ansible_ansible/test/units/utils/collection_loader/fixtures/collections_masked/ansible_collections/testns/testcoll/__init__.py
from __future__ import annotations # pragma: nocover raise Exception('this code should never execute') # pragma: nocover
125
Python
.py
2
60.5
68
0.768595
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,802
test_broken_cowsay.py
ansible_ansible/test/units/utils/display/test_broken_cowsay.py
# -*- coding: utf-8 -*- # Copyright (c) 2021 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations from ansible.utils.display import Display from unittest.mock import MagicMock def test_display_with_fake_cowsay_binary(capsys,...
651
Python
.py
14
43
92
0.746032
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,803
test_warning.py
ansible_ansible/test/units/utils/display/test_warning.py
# -*- coding: utf-8 -*- # Copyright (c) 2020 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.utils.display import Display @pytest.fixture def warning_message(): warning_message = 'bad thin...
1,339
Python
.py
28
43.785714
101
0.731125
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,804
test_logger.py
ansible_ansible/test/units/utils/display/test_logger.py
# -*- coding: utf-8 -*- # Copyright (c) 2020 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import logging import sys def test_logger(): """ Avoid CVE-2019-14846 as 3rd party libs will disclose secrets when ...
1,148
Python
.py
32
30.6875
92
0.697822
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,805
test_curses.py
ansible_ansible/test/units/utils/display/test_curses.py
# -*- coding: utf-8 -*- # Copyright (c) 2021 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import curses import importlib import io import pytest import sys import ansible.utils.display # make available for monkeypatch...
2,729
Python
.py
65
35.584615
100
0.679453
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,806
test_display.py
ansible_ansible/test/units/utils/display/test_display.py
# -*- coding: utf-8 -*- # Copyright (c) 2020 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations from ansible.utils.display import Display def test_display_basic_message(capsys, mocker, display_resource): # Disable logg...
553
Python
.py
13
38.923077
92
0.720974
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,807
conftest.py
ansible_ansible/test/units/modules/conftest.py
# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import json import pytest from ansible.module_utils.common.text.converters import to_bytes @pytest.fixture def patch_ansible_module(request, mocker):...
648
Python
.py
13
46.692308
92
0.754386
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,808
test_iptables.py
ansible_ansible/test/units/modules/test_iptables.py
# Copyright: Contributors to the Ansible project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations from units.modules.utils import AnsibleExitJson, AnsibleFailJson, set_module_args, fail_json, exit_json import pytest from ansible.modules im...
35,216
Python
.py
1,281
18.282592
105
0.480621
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,809
test_systemd.py
ansible_ansible/test/units/modules/test_systemd.py
from __future__ import annotations import unittest from ansible.modules.systemd import parse_systemctl_show class ParseSystemctlShowTestCase(unittest.TestCase): def test_simple(self): lines = [ 'Type=simple', 'Restart=no', 'Requires=system.slice sysinit.target', ...
1,730
Python
.py
45
28.044444
124
0.541989
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,810
test_hostname.py
ansible_ansible/test/units/modules/test_hostname.py
from __future__ import annotations import os import shutil import tempfile from unittest.mock import patch, MagicMock, mock_open from ansible.module_utils.common._utils import get_all_subclasses from ansible.modules import hostname from units.modules.utils import ModuleTestCase, set_module_args class TestHostname(M...
5,055
Python
.py
117
32.478632
81
0.606794
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,811
test_mount_facts.py
ansible_ansible/test/units/modules/test_mount_facts.py
# Copyright: Contributors to the Ansible project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations from ansible.module_utils.basic import AnsibleModule from ansible.modules import mount_facts from units.modules.utils import ( AnsibleExit...
16,869
Python
.py
313
48.501597
148
0.695636
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,812
test_apt_key.py
ansible_ansible/test/units/modules/test_apt_key.py
from __future__ import annotations import os from unittest.mock import patch, Mock import unittest from ansible.modules import apt_key def returnc(x): return 'C' class AptKeyTestCase(unittest.TestCase): @patch.object(apt_key, 'apt_key_bin', '/usr/bin/apt-key') @patch.object(apt_key, 'lang_env', retu...
912
Python
.py
23
32.565217
77
0.640182
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,813
test_copy.py
ansible_ansible/test/units/modules/test_copy.py
# -*- coding: utf-8 -*- # Copyright: # (c) 2018 Ansible Project # License: GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.modules.copy import AnsibleModuleError, split_pre_existing_dir from ansible.module_uti...
7,825
Python
.py
194
36.015464
142
0.646912
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,814
test_uri.py
ansible_ansible/test/units/modules/test_uri.py
# -*- coding: utf-8 -*- # Copyright: # (c) 2023 Ansible Project # License: GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations from unittest.mock import MagicMock, patch from units.modules.utils import AnsibleExitJson, AnsibleFailJson, Module...
1,856
Python
.py
36
43.361111
117
0.639272
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,815
utils.py
ansible_ansible/test/units/modules/utils.py
from __future__ import annotations import json import unittest from unittest.mock import patch from ansible.module_utils import basic from ansible.module_utils.common.text.converters import to_bytes def set_module_args(args): args['_ansible_remote_tmp'] = '/tmp' args['_ansible_keep_remote_files'] = False ...
1,069
Python
.py
29
32
104
0.723633
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,816
test_service_facts.py
ansible_ansible/test/units/modules/test_service_facts.py
# -*- coding: utf-8 -*- # Copyright (c) 2020 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import unittest from unittest.mock import patch from ansible.module_utils import basic from ansible.modules.service_facts import...
5,915
Python
.py
114
48.166667
105
0.463558
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,817
test_async_wrapper.py
ansible_ansible/test/units/modules/test_async_wrapper.py
# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import os import json import shutil import sys import tempfile from ansible.modules import async_wrapper class TestAsyncWrapper: def test_run_mod...
1,415
Python
.py
36
31.527778
92
0.625092
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,818
mount_facts_data.py
ansible_ansible/test/units/modules/mount_facts_data.py
# Copyright: Contributors to the Ansible project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations from dataclasses import dataclass @dataclass class LinuxData: fstab: str fstab_parsed: list[dict[str, str]] mtab: str mtab_...
16,675
Python
.py
560
20.894643
135
0.456921
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,819
test_pip.py
ansible_ansible/test/units/modules/test_pip.py
# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import json import pytest from ansible.modules import pip pytestmark = pytest.mark.usefixtures('patch_ansible_module') @pytest.mark.parametrize('pat...
1,528
Python
.py
27
52.185185
102
0.683009
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,820
test_known_hosts.py
ansible_ansible/test/units/modules/test_known_hosts.py
from __future__ import annotations import os import tempfile from ansible.module_utils import basic import unittest from ansible.module_utils.common.text.converters import to_bytes from ansible.module_utils.basic import AnsibleModule from ansible.modules.known_hosts import compute_diff, sanity_check class KnownHos...
4,319
Python
.py
96
35.604167
107
0.612589
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,821
test_apt.py
ansible_ansible/test/units/modules/test_apt.py
# Copyright: Contributors to the Ansible project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import collections from ansible.modules.apt import expand_pkgspec_from_fnmatches import pytest FakePackage = collections.namedtuple("Package...
1,207
Python
.py
40
23.05
92
0.580895
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,822
test_unarchive.py
ansible_ansible/test/units/modules/test_unarchive.py
# Copyright: Contributors to the Ansible project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import time import pytest from ansible.modules.unarchive import ZipArchive, TgzArchive @pytest.fixture def fake_ansible_module(): retu...
3,803
Python
.py
107
25
100
0.532753
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,823
test_debconf.py
ansible_ansible/test/units/modules/test_debconf.py
# Copyright: Contributors to the Ansible project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.modules.debconf import get_password_value password_testdata = [ pytest.param( ( "ddclien...
1,610
Python
.py
56
20.767857
92
0.575953
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,824
test_service.py
ansible_ansible/test/units/modules/test_service.py
# Copyright: (c) 2021, Ansible Project # Copyright: (c) 2021, Abhijeet Kasurde <akasurde@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import json import platform import pytest from ansible.modules import service from ansi...
1,971
Python
.py
52
32.826923
92
0.702575
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,825
conftest.py
ansible_ansible/test/units/module_utils/conftest.py
# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import json import sys from io import BytesIO import pytest import ansible.module_utils.basic from ansible.module_utils.common.text.converters import t...
2,169
Python
.py
51
37.039216
92
0.709186
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,826
test_distro.py
ansible_ansible/test/units/module_utils/test_distro.py
# (c) 2018 Adrian Likins <alikins@redhat.com> # Copyright (c) 2018 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # or # Apache License v2.0 (see http://www.apache.org/licenses/LICENSE-2.0) # # Dual licensed so any test cases could potentially be included ...
1,159
Python
.py
23
46.434783
105
0.715426
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,827
test_api.py
ansible_ansible/test/units/module_utils/test_api.py
# -*- coding: utf-8 -*- # Copyright: (c) 2020, Abhijeet Kasurde <akasurde@redhat.com> # Copyright: (c) 2020, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations from ansible.module_utils.api import rate_limit, retry, retry_wi...
3,336
Python
.py
87
29.149425
96
0.622512
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,828
test_text.py
ansible_ansible/test/units/module_utils/test_text.py
from __future__ import annotations import codecs from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text def test_exports(): """Ensure legacy attributes are exported.""" from ansible.module_utils import _text assert _text.codecs == codecs assert _text.PY3 is True a...
501
Python
.py
13
34.307692
84
0.726141
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,829
test_connection.py
ansible_ansible/test/units/module_utils/test_connection.py
# -*- coding: utf-8 -*- # Copyright: (c) 2021, Matt Martz <matt@sivel.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations from ansible.module_utils import connection import pytest def test_set_options_credential_exposure(): def se...
594
Python
.py
14
38.357143
92
0.715532
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,830
test_convert_bool.py
ansible_ansible/test/units/module_utils/parsing/test_convert_bool.py
# -*- coding: utf-8 -*- # Copyright: (c) 2017 Ansible Project # License: GNU General Public License v3 or later (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt ) from __future__ import annotations import pytest from ansible.module_utils.parsing.convert_bool import boolean junk_values = ("flibbity", 42, 42...
1,064
Python
.py
29
33.103448
108
0.667969
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,831
test_network.py
ansible_ansible/test/units/module_utils/common/test_network.py
# -*- coding: utf-8 -*- # (c) 2017 Red Hat, Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.network import ( to_bits, to_masklen, to_netmask, to_subnet, to_ipv6_netw...
1,949
Python
.py
53
32.377358
92
0.667201
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,832
test_utils.py
ansible_ansible/test/units/module_utils/common/test_utils.py
# -*- coding: utf-8 -*- # (c) 2018 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations from ansible.module_utils.common.sys_info import get_all_subclasses # # Tests for get_all_subclasses # class TestGetAllSubclasses: c...
1,120
Python
.py
31
27.064516
94
0.616744
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,833
test_dict_transformations.py
ansible_ansible/test/units/module_utils/common/test_dict_transformations.py
# -*- coding: utf-8 -*- # Copyright: (c) 2017, Will Thames <will.thames@xvt.com.au> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.dict_transformations import ( _camel_to_snake, _sn...
4,724
Python
.py
118
32.008475
99
0.580052
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,834
test_collections.py
ansible_ansible/test/units/module_utils/common/test_collections.py
# -*- coding: utf-8 -*- # Copyright (c) 2018–2019, Sviatoslav Sydorenko <webknjaz@redhat.com> # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) """Test low-level utility functions from ``module_utils.common.collections``.""" from __future__ import annotations i...
5,015
Python
.py
112
38.848214
122
0.684835
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,835
test_sys_info.py
ansible_ansible/test/units/module_utils/common/test_sys_info.py
# -*- coding: utf-8 -*- # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2016 Toshio Kuratomi <tkuratomi@ansible.com> # (c) 2017-2018 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from unit...
5,812
Python
.py
123
40.430894
99
0.679362
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,836
test_locale.py
ansible_ansible/test/units/module_utils/common/test_locale.py
# -*- coding: utf-8 -*- # (c) Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations from unittest.mock import MagicMock from ansible.module_utils.common.locale import get_best_parsable_locale class TestLocale: """Tests fo...
1,652
Python
.py
30
48.633333
108
0.675978
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,837
test_warn.py
ansible_ansible/test/units/module_utils/common/warnings/test_warn.py
# -*- coding: utf-8 -*- # (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common import warnings from ansible.module_utils.common.warnings import warn, get_warning_message...
1,293
Python
.py
43
24.790698
93
0.666937
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,838
test_deprecate.py
ansible_ansible/test/units/module_utils/common/warnings/test_deprecate.py
# -*- coding: utf-8 -*- # (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common import warnings from ansible.module_utils.common.warnings import deprecate, get_deprecatio...
3,691
Python
.py
71
46.478873
137
0.692372
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,839
test_check_arguments.py
ansible_ansible/test/units/module_utils/common/parameters/test_check_arguments.py
# -*- coding: utf-8 -*- # Copyright (c) 2020 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.parameters import ( _get_unsupported_parameters, _validate_argument_valu...
1,736
Python
.py
40
38.425
95
0.629674
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,840
test_handle_aliases.py
ansible_ansible/test/units/module_utils/common/parameters/test_handle_aliases.py
# -*- coding: utf-8 -*- # Copyright (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.parameters import _handle_aliases def test_handle_aliases_no_aliases(): ar...
1,555
Python
.py
46
28
104
0.601478
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,841
test_list_deprecations.py
ansible_ansible/test/units/module_utils/common/parameters/test_list_deprecations.py
# -*- coding: utf-8 -*- # Copyright (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations from ansible.module_utils.common.parameters import _list_deprecations def test_list_deprecations(): argument_spec = { ...
1,320
Python
.py
26
45.384615
119
0.602484
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,842
test_list_no_log_values.py
ansible_ansible/test/units/module_utils/common/parameters/test_list_no_log_values.py
# -*- coding: utf-8 -*- # Copyright (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.parameters import _list_no_log_values @pytest.fixture def argument_spec(): ...
6,780
Python
.py
188
25.771277
155
0.503586
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,843
test_get_bin_path.py
ansible_ansible/test/units/module_utils/common/process/test_get_bin_path.py
# -*- coding: utf-8 -*- # Copyright (c) 2020 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.process import get_bin_path def test_get_bin_path(mocker): path = '/usr/loc...
1,516
Python
.py
26
53.923077
93
0.727334
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,844
test_check_type_str.py
ansible_ansible/test/units/module_utils/common/validation/test_check_type_str.py
# -*- coding: utf-8 -*- # Copyright (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.common.validation impo...
960
Python
.py
23
38.434783
92
0.681034
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,845
test_count_terms.py
ansible_ansible/test/units/module_utils/common/validation/test_count_terms.py
# -*- coding: utf-8 -*- # Copyright (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.validation import count_terms @pytest.fixture def params(): return { ...
865
Python
.py
26
29
92
0.661017
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,846
test_check_missing_parameters.py
ansible_ansible/test/units/module_utils/common/validation/test_check_missing_parameters.py
# -*- coding: utf-8 -*- # Copyright: (c) 2021, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.common.validation i...
783
Python
.py
16
45.4375
92
0.729801
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,847
test_check_mutually_exclusive.py
ansible_ansible/test/units/module_utils/common/validation/test_check_mutually_exclusive.py
# -*- coding: utf-8 -*- # Copyright (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.common.validation impo...
1,550
Python
.py
41
32.536585
92
0.682731
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,848
test_check_type_list.py
ansible_ansible/test/units/module_utils/common/validation/test_check_type_list.py
# -*- coding: utf-8 -*- # Copyright (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.validation import check_type_list def test_check_type_list(): test_cases = ...
769
Python
.py
24
26.25
92
0.555556
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,849
test_check_type_path.py
ansible_ansible/test/units/module_utils/common/validation/test_check_type_path.py
# -*- coding: utf-8 -*- # Copyright (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import re import os from ansible.module_utils.common.validation import check_type_path def mock_expand(value): return re.s...
792
Python
.py
20
34.95
92
0.663172
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,850
test_check_required_arguments.py
ansible_ansible/test/units/module_utils/common/validation/test_check_required_arguments.py
# -*- coding: utf-8 -*- # Copyright (c) 2020 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.common.validation impo...
2,073
Python
.py
66
25.060606
92
0.632427
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,851
test_check_required_one_of.py
ansible_ansible/test/units/module_utils/common/validation/test_check_required_one_of.py
# -*- coding: utf-8 -*- # Copyright: (c) 2021, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.common.validation i...
1,341
Python
.py
28
43.821429
92
0.718147
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,852
test_check_type_jsonarg.py
ansible_ansible/test/units/module_utils/common/validation/test_check_type_jsonarg.py
# -*- coding: utf-8 -*- # Copyright (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.common.validation impo...
999
Python
.py
28
29.714286
92
0.598548
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,853
test_check_type_float.py
ansible_ansible/test/units/module_utils/common/validation/test_check_type_float.py
# -*- coding: utf-8 -*- # Copyright (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.common.validation impo...
1,033
Python
.py
30
28.266667
92
0.614458
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,854
test_check_type_int.py
ansible_ansible/test/units/module_utils/common/validation/test_check_type_int.py
# -*- coding: utf-8 -*- # Copyright (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.common.validation impo...
838
Python
.py
26
26.5
92
0.619876
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,855
test_check_required_together.py
ansible_ansible/test/units/module_utils/common/validation/test_check_required_together.py
# -*- coding: utf-8 -*- # Copyright (c) 2020 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.common.validation impo...
1,460
Python
.py
40
31.3
92
0.680912
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,856
test_check_type_bool.py
ansible_ansible/test/units/module_utils/common/validation/test_check_type_bool.py
# -*- coding: utf-8 -*- # Copyright (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.common.validation impo...
1,366
Python
.py
41
26.487805
92
0.587253
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,857
test_check_type_raw.py
ansible_ansible/test/units/module_utils/common/validation/test_check_type_raw.py
# -*- coding: utf-8 -*- # Copyright (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations from ansible.module_utils.common.validation import check_type_raw def test_check_type_raw(): test_cases = ( (1, 1)...
558
Python
.py
17
27.058824
92
0.546642
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,858
test_check_required_by.py
ansible_ansible/test/units/module_utils/common/validation/test_check_required_by.py
# -*- coding: utf-8 -*- # Copyright: (c) 2021, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.common.validation i...
2,608
Python
.py
64
35.421875
92
0.6818
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,859
test_check_type_bits.py
ansible_ansible/test/units/module_utils/common/validation/test_check_type_bits.py
# -*- coding: utf-8 -*- # Copyright (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.common.validation impo...
1,050
Python
.py
35
23.428571
92
0.576389
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,860
test_check_required_if.py
ansible_ansible/test/units/module_utils/common/validation/test_check_required_if.py
# -*- coding: utf-8 -*- # Copyright: (c) 2021, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.common.validation i...
2,420
Python
.py
54
39.666667
104
0.675491
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,861
test_check_type_dict.py
ansible_ansible/test/units/module_utils/common/validation/test_check_type_dict.py
# -*- coding: utf-8 -*- # Copyright (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.validation import check_type_dict def test_check_type_dict(): test_cases = ...
1,023
Python
.py
29
28.931034
95
0.510638
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,862
test_check_type_bytes.py
ansible_ansible/test/units/module_utils/common/validation/test_check_type_bytes.py
# -*- coding: utf-8 -*- # Copyright (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.common.validation impo...
1,198
Python
.py
42
21.547619
92
0.547433
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,863
test_sub_spec.py
ansible_ansible/test/units/module_utils/common/arg_spec/test_sub_spec.py
# -*- coding: utf-8 -*- # Copyright (c) 2021 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations from ansible.module_utils.common.arg_spec import ArgumentSpecValidator, ValidationResult def test_sub_spec(): arg_spec = { ...
2,529
Python
.py
89
17.483146
92
0.426155
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,864
test_validate_invalid.py
ansible_ansible/test/units/module_utils/common/arg_spec/test_validate_invalid.py
# -*- coding: utf-8 -*- # Copyright (c) 2021 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.arg_spec import ArgumentSpecValidator, ValidationResult from ansible.module_utils...
3,874
Python
.py
120
25.008333
109
0.537784
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,865
test_module_validate.py
ansible_ansible/test/units/module_utils/common/arg_spec/test_module_validate.py
# -*- coding: utf-8 -*- # Copyright (c) 2021 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations from ansible.module_utils.common import warnings from ansible.module_utils.common.arg_spec import ModuleArgumentSpecValidator, V...
1,900
Python
.py
45
35.977778
98
0.651655
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,866
test_validate_valid.py
ansible_ansible/test/units/module_utils/common/arg_spec/test_validate_valid.py
# -*- coding: utf-8 -*- # Copyright (c) 2021 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.arg_spec import ArgumentSpecValidator, ValidationResult # Each item is id, argum...
7,920
Python
.py
325
15.587692
111
0.394015
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,867
test_aliases.py
ansible_ansible/test/units/module_utils/common/arg_spec/test_aliases.py
# -*- coding: utf-8 -*- # Copyright (c) 2021 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.errors import AnsibleValidationError, AnsibleValidationErrorMultiple from ansible.module...
3,738
Python
.py
116
24.344828
97
0.560421
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,868
test_lenient_lowercase.py
ansible_ansible/test/units/module_utils/common/text/formatters/test_lenient_lowercase.py
# -*- coding: utf-8 -*- # Copyright 2019, Andrew Klychkov @Andersson007 <aaklychkov@mail.ru> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations from datetime import datetime import pytest from ansible.module_utils.common.text.formatters im...
1,693
Python
.py
55
25.527273
92
0.645
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,869
test_bytes_to_human.py
ansible_ansible/test/units/module_utils/common/text/formatters/test_bytes_to_human.py
# -*- coding: utf-8 -*- # Copyright 2019, Andrew Klychkov @Andersson007 <aaklychkov@mail.ru> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.common.text.formatters import bytes_to_human @pytest.m...
4,045
Python
.py
102
32.843137
92
0.589822
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,870
test_human_to_bytes.py
ansible_ansible/test/units/module_utils/common/text/formatters/test_human_to_bytes.py
# -*- coding: utf-8 -*- # Copyright 2019, Andrew Klychkov @Andersson007 <aaklychkov@mail.ru> # Copyright 2019, Sviatoslav Sydorenko <webknjaz@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_u...
7,565
Python
.py
228
26.77193
117
0.565681
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,871
test_container_to_text.py
ansible_ansible/test/units/module_utils/common/text/converters/test_container_to_text.py
# -*- coding: utf-8 -*- # Copyright 2019, Andrew Klychkov @Andersson007 <aaklychkov@mail.ru> # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import annotations import pytest from ansible.module_utils.common.text.converters import container_to...
2,613
Python
.py
66
33.287879
106
0.605976
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,872
test_json_encode_fallback.py
ansible_ansible/test/units/module_utils/common/text/converters/test_json_encode_fallback.py
# -*- coding: utf-8 -*- # Copyright 2019, Andrew Klychkov @Andersson007 <aaklychkov@mail.ru> # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import annotations import pytest from datetime import datetime, timedelta, tzinfo from ansible.modul...
1,752
Python
.py
49
30.265306
118
0.650503
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,873
test_container_to_bytes.py
ansible_ansible/test/units/module_utils/common/text/converters/test_container_to_bytes.py
# -*- coding: utf-8 -*- # Copyright 2019, Andrew Klychkov @Andersson007 <aaklychkov@mail.ru> # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import annotations import pytest from ansible.module_utils.common.text.converters import container_to...
3,172
Python
.py
81
32.567901
106
0.61407
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,874
test_jsonify.py
ansible_ansible/test/units/module_utils/common/text/converters/test_jsonify.py
# -*- coding: utf-8 -*- # Copyright 2019, Andrew Klychkov @Andersson007 <aaklychkov@mail.ru> # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import annotations import pytest from ansible.module_utils.common.text.converters import jsonify @p...
760
Python
.py
21
30.904762
106
0.637241
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,875
test_to_str.py
ansible_ansible/test/units/module_utils/common/text/converters/test_to_str.py
# -*- coding: utf-8 -*- # (c) 2016 Toshio Kuratomi <tkuratomi@ansible.com> # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import itertools import pytest from ansible.module_utils.common.text.convert...
1,946
Python
.py
35
47
96
0.619249
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,876
test_get_module_path.py
ansible_ansible/test/units/module_utils/basic/test_get_module_path.py
# -*- coding: utf-8 -*- # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2016 Toshio Kuratomi <tkuratomi@ansible.com> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations from units.mock.procenv impor...
715
Python
.py
15
44.133333
92
0.737752
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,877
test__symbolic_mode_to_octal.py
ansible_ansible/test/units/module_utils/basic/test__symbolic_mode_to_octal.py
# -*- coding: utf-8 -*- # Copyright: # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2016-2017 Ansible Project # License: GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from ansible.module_utils.basic im...
3,447
Python
.py
89
35.033708
101
0.658778
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,878
test_exit_json.py
ansible_ansible/test/units/module_utils/basic/test_exit_json.py
# -*- coding: utf-8 -*- # Copyright (c) 2015-2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import json import sys import datetime import typing as t import pytest from ansible.module_utils.common import warnings ...
7,131
Python
.py
135
42.266667
114
0.588345
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,879
test_atomic_move.py
ansible_ansible/test/units/module_utils/basic/test_atomic_move.py
# -*- coding: utf-8 -*- # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2016 Toshio Kuratomi <tkuratomi@ansible.com> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import os import errno import...
9,995
Python
.py
174
51.568966
124
0.687749
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,880
test_log.py
ansible_ansible/test/units/module_utils/basic/test_log.py
# -*- coding: utf-8 -*- # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import syslog from itertools import product import pytest class TestAnsibleM...
2,711
Python
.py
52
43.288462
97
0.634994
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,881
test_safe_eval.py
ansible_ansible/test/units/module_utils/basic/test_safe_eval.py
# -*- coding: utf-8 -*- # (c) 2015-2017, Toshio Kuratomi <tkuratomi@ansible.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations from itertools import chain import typing as t import pytest # Strings that should be converted into a ty...
2,321
Python
.py
55
35.527273
92
0.612
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,882
test_filesystem.py
ansible_ansible/test/units/module_utils/basic/test_filesystem.py
# -*- coding: utf-8 -*- # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2016 Toshio Kuratomi <tkuratomi@ansible.com> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations from units.mock.procenv impor...
5,640
Python
.py
119
36.478992
104
0.597884
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,883
test_command_nonexisting.py
ansible_ansible/test/units/module_utils/basic/test_command_nonexisting.py
from __future__ import annotations import json import sys import pytest import subprocess from ansible.module_utils.common.text.converters import to_bytes from ansible.module_utils import basic def test_run_non_existent_command(monkeypatch): """ Test that `command` returns std{out,err} even if the executable is ...
855
Python
.py
21
36
98
0.701691
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,884
test_imports.py
ansible_ansible/test/units/module_utils/basic/test_imports.py
# -*- coding: utf-8 -*- # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2016 Toshio Kuratomi <tkuratomi@ansible.com> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import sys from units.mock.p...
3,476
Python
.py
68
42.441176
109
0.651622
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,885
test_set_cwd.py
ansible_ansible/test/units/module_utils/basic/test_set_cwd.py
# -*- coding: utf-8 -*- # Copyright (c) 2018 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import json import os import tempfile from unittest.mock import patch from ansible.module_utils.common.text.converters import to...
5,891
Python
.py
140
31.692857
102
0.581302
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,886
test_get_file_attributes.py
ansible_ansible/test/units/module_utils/basic/test_get_file_attributes.py
# -*- coding: utf-8 -*- # Copyright: # (c) 2017, Pierre-Louis Bonicoli <pierre-louis@libregerbil.fr> # License: GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations from itertools import product from ansible.module_utils.basic import AnsibleM...
2,599
Python
.py
62
36.612903
101
0.576801
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,887
test_deprecate_warn.py
ansible_ansible/test/units/module_utils/basic/test_deprecate_warn.py
# -*- coding: utf-8 -*- # # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import json import pytest from ansible.module_utils.common import warnings @pytest.mark.parametrize('stdin', [{}], indirect...
3,515
Python
.py
58
55.362069
128
0.682466
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,888
test_dict_converters.py
ansible_ansible/test/units/module_utils/basic/test_dict_converters.py
# -*- coding: utf-8 -*- # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2016 Toshio Kuratomi <tkuratomi@ansible.com> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations from units.mock.procenv impor...
945
Python
.py
22
36.227273
101
0.666667
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,889
test_argument_spec.py
ansible_ansible/test/units/module_utils/basic/test_argument_spec.py
# -*- coding: utf-8 -*- # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2016 Toshio Kuratomi <tkuratomi@ansible.com> # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import json import os impor...
32,580
Python
.py
613
45.615008
145
0.599529
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,890
test_tmpdir.py
ansible_ansible/test/units/module_utils/basic/test_tmpdir.py
# -*- coding: utf-8 -*- # Copyright (c) 2018 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import json import os import tempfile import pytest from unittest.mock import patch, MagicMock from ansible.module_utils.common...
3,926
Python
.py
92
31.608696
104
0.571991
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,891
test_get_available_hash_algorithms.py
ansible_ansible/test/units/module_utils/basic/test_get_available_hash_algorithms.py
"""Unit tests to provide coverage not easily obtained from integration tests.""" from __future__ import annotations from ansible.module_utils.basic import _get_available_hash_algorithms def test_unavailable_algorithm(mocker): """Simulate an available algorithm that isn't.""" expected_algorithms = {'sha256',...
1,086
Python
.py
16
63.375
104
0.753308
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,892
test_set_mode_if_different.py
ansible_ansible/test/units/module_utils/basic/test_set_mode_if_different.py
# -*- coding: utf-8 -*- # (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com> # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import builtins import errno import os from itertools import product import...
6,720
Python
.py
140
41.514286
123
0.666769
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,893
test_platform_distribution.py
ansible_ansible/test/units/module_utils/basic/test_platform_distribution.py
# -*- coding: utf-8 -*- # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2016 Toshio Kuratomi <tkuratomi@ansible.com> # (c) 2017-2018 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest from unit...
5,994
Python
.py
131
38.099237
99
0.672636
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,894
test_run_command.py
ansible_ansible/test/units/module_utils/basic/test_run_command.py
# -*- coding: utf-8 -*- # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import selectors from itertools import product from io import BytesIO import pytest from ansible.module_utils.common.text.conve...
9,984
Python
.py
200
40.19
102
0.610465
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,895
test_no_log.py
ansible_ansible/test/units/module_utils/basic/test_no_log.py
# -*- coding: utf-8 -*- # (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com> # (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import typing as t import unittest from ansible.module_utils.basic import remove_valu...
6,233
Python
.py
144
30.784722
128
0.481061
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,896
test_heuristic_log_sanitize.py
ansible_ansible/test/units/module_utils/basic/test_heuristic_log_sanitize.py
# -*- coding: utf-8 -*- # (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (a...
3,744
Python
.py
76
40.921053
122
0.641489
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,897
test__log_invocation.py
ansible_ansible/test/units/module_utils/basic/test__log_invocation.py
# -*- coding: utf-8 -*- # (c) 2016, James Cammarata <jimi@sngx.net> # (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import pytest ARGS = dict(foo=False, bar=[1, 2, 3], bam="bam", baz=u'baz') ARGUMENT_SPEC = d...
1,746
Python
.py
43
34.976744
126
0.636525
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,898
test_sanitize_keys.py
ansible_ansible/test/units/module_utils/basic/test_sanitize_keys.py
# -*- coding: utf-8 -*- # (c) 2020, Red Hat # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations from ansible.module_utils.basic import sanitize_keys def test_sanitize_keys_non_dict_types(): """ Test that non-dict-like objects return the...
2,518
Python
.py
67
29.208955
107
0.530334
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,899
test_selinux.py
ansible_ansible/test/units/module_utils/basic/test_selinux.py
# -*- coding: utf-8 -*- # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2016 Toshio Kuratomi <tkuratomi@ansible.com> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import errno import json impo...
10,477
Python
.py
168
51.035714
131
0.627581
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)