/dports/www/py-pyjwt1/PyJWT-1.7.1/tests/ |
H A D | test_cli.py | 43 def test_decode_payload_raises_decoded_error_isatty(self, monkeypatch): argument 52 monkeypatch.setattr(sys.stdin, 'isatty', lambda: True) 53 monkeypatch.setattr(sys.stdin, 'read', patched_sys_stdin_read) 60 def test_decode_payload_terminal_tty(self, monkeypatch): argument 73 monkeypatch.setattr(sys.stdin, 'isatty', lambda: True) 74 monkeypatch.setattr(sys.stdin, 'readline', lambda: token) 79 def test_decode_payload_raises_terminal_not_a_tty(self, monkeypatch): argument 84 monkeypatch.setattr(sys.stdin, 'isatty', lambda: False) 135 def test_main(self, monkeypatch, key, name, job, exp, verify): argument 147 monkeypatch.setattr(sys, 'argv', args) [all …]
|
/dports/sysutils/ansible2/ansible-2.9.27/test/units/module_utils/basic/ |
H A D | test_tmpdir.py | 66 def test_tmpdir_property(self, monkeypatch, args, expected, stat_exists): argument 78 monkeypatch.setattr(tempfile, 'mkdtemp', mock_mkdtemp) 79 monkeypatch.setattr(os.path, 'exists', lambda x: stat_exists) 80 monkeypatch.setattr(os, 'makedirs', mock_makedirs) 81 monkeypatch.setattr(shutil, 'rmtree', lambda x: None) 82 … monkeypatch.setattr(basic, '_ANSIBLE_ARGS', to_bytes(json.dumps({'ANSIBLE_MODULE_ARGS': args}))) 103 def test_tmpdir_makedirs_failure(self, am, monkeypatch): argument 108 monkeypatch.setattr(tempfile, 'mkdtemp', mock_mkdtemp) 109 monkeypatch.setattr(os.path, 'exists', lambda x: False) 110 monkeypatch.setattr(os, 'makedirs', mock_makedirs)
|
/dports/sysutils/py-ansible-core/ansible-core-2.11.6/test/units/module_utils/basic/ |
H A D | test_tmpdir.py | 66 def test_tmpdir_property(self, monkeypatch, args, expected, stat_exists): argument 78 monkeypatch.setattr(tempfile, 'mkdtemp', mock_mkdtemp) 79 monkeypatch.setattr(os.path, 'exists', lambda x: stat_exists) 80 monkeypatch.setattr(os, 'makedirs', mock_makedirs) 81 monkeypatch.setattr(shutil, 'rmtree', lambda x: None) 82 … monkeypatch.setattr(basic, '_ANSIBLE_ARGS', to_bytes(json.dumps({'ANSIBLE_MODULE_ARGS': args}))) 103 def test_tmpdir_makedirs_failure(self, am, monkeypatch): argument 108 monkeypatch.setattr(tempfile, 'mkdtemp', mock_mkdtemp) 109 monkeypatch.setattr(os.path, 'exists', lambda x: False) 110 monkeypatch.setattr(os, 'makedirs', mock_makedirs)
|
/dports/sysutils/py-ansible-base/ansible-base-2.10.15/test/units/module_utils/basic/ |
H A D | test_tmpdir.py | 66 def test_tmpdir_property(self, monkeypatch, args, expected, stat_exists): argument 78 monkeypatch.setattr(tempfile, 'mkdtemp', mock_mkdtemp) 79 monkeypatch.setattr(os.path, 'exists', lambda x: stat_exists) 80 monkeypatch.setattr(os, 'makedirs', mock_makedirs) 81 monkeypatch.setattr(shutil, 'rmtree', lambda x: None) 82 … monkeypatch.setattr(basic, '_ANSIBLE_ARGS', to_bytes(json.dumps({'ANSIBLE_MODULE_ARGS': args}))) 103 def test_tmpdir_makedirs_failure(self, am, monkeypatch): argument 108 monkeypatch.setattr(tempfile, 'mkdtemp', mock_mkdtemp) 109 monkeypatch.setattr(os.path, 'exists', lambda x: False) 110 monkeypatch.setattr(os, 'makedirs', mock_makedirs)
|
/dports/devel/py-ddtrace/ddtrace-0.56.1/tests/integration/ |
H A D | test_integration.py | 116 def test_single_trace_uds(encoding, monkeypatch): argument 151 def test_payload_too_large(encoding, monkeypatch): argument 183 def test_large_payload(encoding, monkeypatch): argument 200 def test_child_spans(encoding, monkeypatch): argument 217 def test_metrics(encoding, monkeypatch): argument 266 def test_trace_bad_url(encoding, monkeypatch): argument 288 def test_writer_headers(encoding, monkeypatch): argument 408 def test_bad_payload_log_payload(monkeypatch): argument 511 def test_downgrade(encoding, monkeypatch): argument 526 def test_span_tags(encoding, monkeypatch): argument [all …]
|
/dports/sysutils/ansible2/ansible-2.9.27/test/units/module_utils/ |
H A D | test_vmware.py | 106 def test_lib_loading_failure(monkeypatch, fake_ansible_module, key, libname): argument 108 monkeypatch.setattr(vmware_module_utils, key, False) 127 def test_validate_certs(monkeypatch, fake_ansible_module): argument 131 monkeypatch.setattr(vmware_module_utils, 'ssl', None) 140 def test_vmdk_disk_path_split(monkeypatch, fake_ansible_module): argument 150 def test_vmdk_disk_path_split_negative(monkeypatch, fake_ansible_module): argument 163 def test_connect_to_api_validate_certs(monkeypatch, fake_ansible_module): argument 164 monkeypatch.setattr(vmware_module_utils, 'connect', mock.Mock()) 173 monkeypatch.setattr(vmware_module_utils.ssl, 'SSLContext', MockSSLContext) 206 monkeypatch.delattr(vmware_module_utils.ssl, 'SSLContext') [all …]
|
/dports/devel/py-tox/tox-3.12.1/tests/unit/session/ |
H A D | test_parallel.py | 88 def test_parallel_error_report(cmd, initproj, monkeypatch, live): argument 89 monkeypatch.setenv(str("_TOX_SKIP_ENV_CREATION_TEST"), str("1")) 124 def test_parallel_deadlock(cmd, initproj, monkeypatch): argument 125 monkeypatch.setenv(str("_TOX_SKIP_ENV_CREATION_TEST"), str("1")) 143 def test_parallel_recreate(cmd, initproj, monkeypatch): argument 144 monkeypatch.setenv(str("_TOX_SKIP_ENV_CREATION_TEST"), str("1")) 172 def test_parallel_show_output(cmd, initproj, monkeypatch): argument 173 monkeypatch.setenv(str("_TOX_SKIP_ENV_CREATION_TEST"), str("1")) 217 def test_parallel_no_spinner_on(cmd, parallel_project, monkeypatch): argument 218 monkeypatch.setenv(str("TOX_PARALLEL_NO_SPINNER"), str("1")) [all …]
|
/dports/databases/pgbarman/barman-release-2.17/tests/ |
H A D | test_cli.py | 57 monkeypatch.setattr( 81 monkeypatch.setattr( 100 monkeypatch.setattr( 126 monkeypatch.setattr( 175 monkeypatch.setattr( 226 monkeypatch.setattr( 272 monkeypatch.setattr( 306 monkeypatch.setattr( 349 monkeypatch.setattr( 390 monkeypatch.setattr( [all …]
|
/dports/devel/py-click/click-8.0.3/tests/ |
H A D | test_termui.py | 28 def test_progressbar_strip_regression(runner, monkeypatch): argument 44 def test_progressbar_length_hint(runner, monkeypatch): argument 74 def test_progressbar_hidden(runner, monkeypatch): argument 183 def test_progressbar_is_iterator(runner, monkeypatch): argument 198 def test_choices_list_in_prompt(runner, monkeypatch): argument 259 def test_progressbar_update(runner, monkeypatch): argument 269 monkeypatch.setattr(time, "time", fake_clock.time) 334 monkeypatch.setattr(click.termui, "_getchar", None) 346 monkeypatch.setattr( 349 monkeypatch.setattr(click.termui, "_getchar", None) [all …]
|
/dports/devel/py-pip/pip-20.3.4/tests/unit/ |
H A D | test_self_check_outdated.py | 89 def test_pip_self_version_check(monkeypatch, stored_time, installed_ver, argument 92 monkeypatch.setattr(self_outdated_check, 'get_installed_version', 94 monkeypatch.setattr(self_outdated_check, 'PackageFinder', 96 monkeypatch.setattr(logger, 'warning', 98 monkeypatch.setattr(logger, 'debug', 100 monkeypatch.setattr(self_outdated_check, 'get_distribution', 107 monkeypatch.setattr( 171 def test_self_check_state_key_uses_sys_prefix(monkeypatch): argument 174 monkeypatch.setattr(sys, "prefix", key) 199 monkeypatch.setattr(sys, "prefix", key) [all …]
|
/dports/devel/py-ddtrace/ddtrace-0.56.1/tests/profiling/ |
H A D | test_uwsgi.py | 25 def uwsgi(monkeypatch): argument 27 monkeypatch.setenv("DD_PROFILING_IGNORE_PROFILER", "0") 45 def test_uwsgi_threads_enabled(uwsgi, tmp_path, monkeypatch): argument 47 monkeypatch.setenv("DD_PROFILING_OUTPUT_PPROF", filename) 58 def test_uwsgi_threads_processes_no_master(uwsgi, monkeypatch): argument 87 def test_uwsgi_threads_processes_master(uwsgi, tmp_path, monkeypatch): argument 89 monkeypatch.setenv("DD_PROFILING_OUTPUT_PPROF", filename) 100 def test_uwsgi_threads_processes_master_lazy_apps(uwsgi, tmp_path, monkeypatch): argument 102 monkeypatch.setenv("DD_PROFILING_OUTPUT_PPROF", filename) 144 def test_uwsgi_threads_processes_no_master_lazy_apps(uwsgi, tmp_path, monkeypatch): argument [all …]
|
/dports/net/py-amqp/amqp-2.6.1/t/unit/ |
H A D | test_platform.py | 36 def monkeypatch_platform(monkeypatch, sys_platform, platform_release): argument 37 monkeypatch.setattr("sys.platform", sys_platform) 42 monkeypatch.setattr("platform.release", release) 45 def test_tcp_opts_change(monkeypatch): argument 46 monkeypatch_platform(monkeypatch, 'linux', '2.6.36-1-amd64') 52 monkeypatch_platform(monkeypatch, 'linux', '2.6.37-0-41-generic') 56 monkeypatch_platform(monkeypatch, 'win32', '7') 60 monkeypatch_platform(monkeypatch, 'linux', '4.4.0-43-Microsoft')
|
/dports/net/py-urllib3/urllib3-1.26.7/test/ |
H A D | test_ssl.py | 56 def test_context_sni_with_ip_address(monkeypatch, has_sni, server_hostname, uses_sni): argument 57 monkeypatch.setattr(ssl_, "HAS_SNI", has_sni) 82 monkeypatch, has_sni, server_hostname, should_warn argument 84 monkeypatch.setattr(ssl_, "HAS_SNI", has_sni) 112 monkeypatch.setattr(ssl_, "SSLContext", lambda *_, **__: context) 131 def test_wrap_socket_given_ca_certs_no_load_default_certs(monkeypatch): argument 136 monkeypatch.setattr(ssl_, "SSLContext", lambda *_, **__: context) 145 def test_wrap_socket_default_loads_default_certs(monkeypatch): argument 150 monkeypatch.setattr(ssl_, "SSLContext", lambda *_, **__: context) 161 def test_create_urllib3_context_pha(monkeypatch, pha, expected_pha): argument [all …]
|
/dports/devel/py-tox/tox-3.12.1/tests/unit/util/ |
H A D | test_spinner.py | 16 def test_spinner(capfd, monkeypatch): argument 17 monkeypatch.setattr(sys.stdout, "isatty", lambda: False) 33 def test_spinner_progress(capfd, monkeypatch): argument 34 monkeypatch.setattr(sys.stdout, "isatty", lambda: False) 46 def test_spinner_atty(capfd, monkeypatch): argument 47 monkeypatch.setattr(sys.stdout, "isatty", lambda: True) 61 def test_spinner_report(capfd, monkeypatch): argument 62 monkeypatch.setattr(sys.stdout, "isatty", lambda: False) 84 def test_spinner_long_text(capfd, monkeypatch): argument 103 def test_spinner_stdout_not_unicode(capfd, monkeypatch): argument [all …]
|
/dports/lang/spidermonkey78/firefox-78.9.0/third_party/python/urllib3/test/ |
H A D | test_ssl.py | 55 def test_context_sni_with_ip_address(monkeypatch, has_sni, server_hostname, uses_sni): argument 56 monkeypatch.setattr(ssl_, "HAS_SNI", has_sni) 81 monkeypatch, has_sni, server_hostname, should_warn argument 83 monkeypatch.setattr(ssl_, "HAS_SNI", has_sni) 111 monkeypatch.setattr(ssl_, "SSLContext", lambda *_, **__: context) 130 def test_wrap_socket_given_ca_certs_no_load_default_certs(monkeypatch): argument 135 monkeypatch.setattr(ssl_, "SSLContext", lambda *_, **__: context) 144 def test_wrap_socket_default_loads_default_certs(monkeypatch): argument 149 monkeypatch.setattr(ssl_, "SSLContext", lambda *_, **__: context) 160 def test_create_urllib3_context_pha(monkeypatch, pha, expected_pha): argument [all …]
|
/dports/sysutils/ansible/ansible-4.7.0/ansible_collections/community/vmware/tests/unit/module_utils/ |
H A D | test_vmware.py | 107 def test_lib_loading_failure(monkeypatch, fake_ansible_module, key, libname): argument 109 monkeypatch.setattr(vmware_module_utils, key, False) 128 def test_validate_certs(monkeypatch, fake_ansible_module): argument 132 monkeypatch.setattr(vmware_module_utils, 'ssl', mock.Mock()) 142 def test_vmdk_disk_path_split(monkeypatch, fake_ansible_module): argument 152 def test_vmdk_disk_path_split_negative(monkeypatch, fake_ansible_module): argument 165 def test_connect_to_api_validate_certs(monkeypatch, fake_ansible_module): argument 166 monkeypatch.setattr(vmware_module_utils, 'connect', mock.Mock()) 175 monkeypatch.setattr(vmware_module_utils.ssl, 'SSLContext', MockSSLContext) 208 monkeypatch.delattr(vmware_module_utils.ssl, 'SSLContext') [all …]
|
/dports/devel/py-tox/tox-3.12.1/tests/unit/config/ |
H A D | test_config.py | 206 monkeypatch.undo() 294 monkeypatch.chdir(tmp_path) 299 def test_get_homedir(monkeypatch): argument 309 def test_blank(self, monkeypatch): argument 313 def test_jenkins(self, monkeypatch): argument 1141 monkeypatch.setenv("A1", "a1") 2412 monkeypatch.setenv("X", "2") 2427 monkeypatch.setenv("X", "2") 2443 monkeypatch.setenv("X", "1") 2962 monkeypatch.chdir(tmpdir) [all …]
|
/dports/net/py-suds-community/suds-community-1.0.0/tests/ |
H A D | test_cache.py | 449 monkeypatch.undo() 456 monkeypatch.undo() 467 monkeypatch.undo() 498 monkeypatch.undo() 513 monkeypatch.undo() 588 monkeypatch.undo() 943 monkeypatch.undo() 950 monkeypatch.undo() 961 monkeypatch.undo() 990 monkeypatch.undo() [all …]
|
/dports/devel/py-setuptools_scm/setuptools_scm-6.3.2/testing/ |
H A D | test_git.py | 25 def wd(wd, monkeypatch): argument 26 monkeypatch.delenv("HOME", raising=False) 48 monkeypatch.delenv("SETUPTOOLS_SCM_DEBUG") 62 monkeypatch.delenv("SETUPTOOLS_SCM_DEBUG") 74 def test_git_gone(wd, monkeypatch): argument 142 monkeypatch.delenv("SETUPTOOLS_SCM_DEBUG") 298 monkeypatch.chdir(wd.cwd) 308 monkeypatch.chdir(wd.cwd) 318 monkeypatch.chdir(wd.cwd / "foobar") 371 def test_gitdir(monkeypatch, wd): argument [all …]
|
/dports/sysutils/py-focker/focker-ce2108e3/tests/ |
H A D | test_bootstrap.py | 75 def test_bootstrap_05(monkeypatch): argument 78 monkeypatch.setattr(focker.bootstrap, 'create_interface', fake_create_interface) 93 def test_bootstrap_06(monkeypatch): argument 98 monkeypatch.setattr(focker.bootstrap, 'add_pf_rule', fake_add_pf_rule) 114 def test_bootstrap_07(monkeypatch): argument 127 monkeypatch.setattr(focker.bootstrap, 'add_pf_rule', fake_add_pf_rule) 131 monkeypatch.setattr(focker.bootstrap, 'bootstrap_empty', fake_bootstrap_empty) 164 def test_bootstrap_common_01(monkeypatch): argument 171 monkeypatch.setattr(focker.bootstrap, 'hashlib', fake_hashlib) 177 def test_bootstrap_common_finalize_01(monkeypatch): argument [all …]
|
/dports/math/py-numpy/numpy-1.20.3/numpy/distutils/tests/ |
H A D | test_fcompiler.py | 15 def test_fcompiler_flags(monkeypatch): argument 16 monkeypatch.setenv('NPY_DISTUTILS_APPEND_FLAGS', '0') 24 monkeypatch.setenv(envvar, new_flag) 27 monkeypatch.delenv(envvar) 30 monkeypatch.setenv('NPY_DISTUTILS_APPEND_FLAGS', '1') 35 monkeypatch.setenv(envvar, new_flag) 38 monkeypatch.delenv(envvar)
|
/dports/net/py-dugong/dugong-3.7.5/test/ |
H A D | test_dugong.py | 174 def test_dns_one(monkeypatch): argument 181 def test_dns_two(monkeypatch): argument 415 def test_discard(conn, monkeypatch): argument 477 def test_conn_close_1(conn, monkeypatch): argument 501 def test_conn_close_2(conn, monkeypatch): argument 700 def test_read_raw(conn, monkeypatch): argument 718 def test_abort_read(conn, monkeypatch): argument 839 def test_100cont(conn, monkeypatch): argument 877 def test_100cont_2(conn, monkeypatch): argument 891 def test_100cont_3(conn, monkeypatch): argument [all …]
|
/dports/devel/py-platformdirs/platformdirs-2.4.0/tests/ |
H A D | test_unix.py | 7 from _pytest.monkeypatch import MonkeyPatch 77 def test_xdg_variable_not_set(monkeypatch: MonkeyPatch, dirs_instance: Unix, func: str) -> None: 82 monkeypatch.delenv(xdg_variable.name, raising=False) 88 def test_xdg_variable_empty_value(monkeypatch: MonkeyPatch, dirs_instance: Unix, func: str) -> None: 93 monkeypatch.setenv(xdg_variable.name, "") 99 def test_xdg_variable_custom_value(monkeypatch: MonkeyPatch, dirs_instance: Unix, func: str) -> Non… 104 monkeypatch.setenv(xdg_variable.name, "/tmp/custom-dir") 109 def test_platform_non_linux(monkeypatch: MonkeyPatch) -> None: 113 with monkeypatch.context() as context: 115 monkeypatch.delenv("XDG_RUNTIME_DIR", raising=False)
|
/dports/textproc/py-duecredit/duecredit-0.9.1/duecredit/tests/ |
H A D | test__main__.py | 19 def test_main_help(monkeypatch): argument 22 monkeypatch.setattr(sys, "stdout", fakestdout) 30 def test_main_version(monkeypatch): argument 33 monkeypatch.setattr(sys, "stdout", fakestdout) 39 def test_main_run_a_script(tmpdir, monkeypatch): argument 47 monkeypatch.setattr(sys, "stdout", fakestdout) 55 monkeypatch.setattr(due, "activate", count_calls)
|
/dports/sysutils/ansible2/ansible-2.9.27/test/units/plugins/connection/ |
H A D | test_winrm.py | 240 monkeypatch.setattr("subprocess.Popen", mock_popen) 269 monkeypatch.setattr("pexpect.spawn", mock_pexpect) 297 monkeypatch.setattr("subprocess.Popen", mock_popen) 320 monkeypatch.setattr("pexpect.spawn", mock_pexpect) 335 def test_kinit_error_subprocess(self, monkeypatch): argument 345 monkeypatch.setattr("subprocess.Popen", mock_popen) 361 def test_kinit_error_pexpect(self, monkeypatch): argument 370 monkeypatch.setattr("pexpect.spawn", mock_pexpect) 393 monkeypatch.setattr("subprocess.Popen", mock_popen) 408 def test_kinit_error_pass_in_output_pexpect(self, monkeypatch): argument [all …]
|