Home
last modified time | relevance | path

Searched refs:monkeypatch (Results 101 – 125 of 1935) sorted by relevance

12345678910>>...78

/dports/sysutils/py-diffoscope/diffoscope-204/tests/comparators/
H A Dtest_java.py57 def differences_procyon(monkeypatch, class1, class2): argument
58 monkeypatch.setattr(class1, "decompilers", [ProcyonDecompiler])
63 def differences_javap(monkeypatch, class1, class2): argument
64 monkeypatch.setattr(class1, "decompilers", [Javap])
73 def compare_non_existing(monkeypatch, class1, decompiler): argument
74 monkeypatch.setattr(Config(), "new_file", True)
75 monkeypatch.setattr(class1, "decompilers", [decompiler])
103 def test_compare_non_existing_procyon(monkeypatch, class1): argument
104 compare_non_existing(monkeypatch, class1, ProcyonDecompiler)
108 def test_compare_non_existing_javap(monkeypatch, class1): argument
[all …]
H A Dtest_elf_decompiler.py57 def exclude_commands(monkeypatch, patterns): argument
60 monkeypatch.setattr(Config(), "exclude_commands", excluded)
64 def init_tests(request, monkeypatch): argument
66 exclude_commands(monkeypatch, ["^readelf.*", "^objdump.*"])
81 def test_obj_compare_non_existing(monkeypatch, obj1): argument
82 monkeypatch.setattr(Config(), "new_file", True)
91 def test_ghidra_diff(monkeypatch, obj1, obj2): argument
92 exclude_commands(monkeypatch, ["^radare2 disass.*"])
100 def test_radare2_diff(monkeypatch, obj1, obj2): argument
101 exclude_commands(monkeypatch, ["^radare2 r2ghidra.*"])
H A Dtest_macho_decompiler.py56 def exclude_commands(monkeypatch, patterns): argument
59 monkeypatch.setattr(Config(), "exclude_commands", excluded)
63 def init_tests(request, monkeypatch): argument
66 monkeypatch,
89 def test_obj_compare_non_existing(monkeypatch, obj1): argument
90 monkeypatch.setattr(Config(), "new_file", True)
99 def test_ghidra_diff(monkeypatch, obj1, obj2): argument
100 exclude_commands(monkeypatch, ["^radare2 disass.*"])
111 def test_radare2_diff(monkeypatch, obj1, obj2): argument
112 exclude_commands(monkeypatch, ["^radare2 r2ghidra.*"])
/dports/www/py-falcon/falcon-2.0.0/tests/
H A Dtest_static.py84 def test_bad_path(uri, monkeypatch): argument
85 monkeypatch.setattr(io, 'open', lambda path, mode: path)
148 monkeypatch.setattr(io, 'open', lambda path, mode: path)
169 def test_lifo(client, monkeypatch): argument
184 def test_lifo_negative(client, monkeypatch): argument
199 def test_downloadable(client, monkeypatch): argument
235 monkeypatch): argument
242 monkeypatch.setattr(io, 'open', mockOpen)
284 monkeypatch.setattr(io, 'open', mockOpen)
314 def test_match(default, path, expected, monkeypatch): argument
[all …]
/dports/devel/py-pip/pip-20.3.4/tests/unit/
H A Dtest_configuration.py32 def test_environment_config_loading(self, monkeypatch): argument
39 monkeypatch.setenv("PIP_CONFIG_FILE", config_file)
45 def test_environment_var_loading(self, monkeypatch): argument
46 monkeypatch.setenv("PIP_HELLO", "5")
53 monkeypatch.setenv("pip_hello", "5")
60 monkeypatch.setenv("PIP_VERSION", "True")
73 monkeypatch.setenv("PIP_CONFIG_FILE", config_file)
133 monkeypatch.setenv("PIP_HELLO", "5")
142 monkeypatch.setenv("PIP_HELLO", "5")
151 monkeypatch.setenv("PIP_HELLO", "5")
[all …]
/dports/devel/py-loguru/loguru-0.5.3/tests/
H A Dtest_filesink_rotation.py26 def reload_filesink_ctime_functions(monkeypatch): argument
33 def monkeypatch_filesystem(monkeypatch): argument
75 monkeypatch.setattr(os, "stat", patched_stat)
86 reload_filesink_ctime_functions(monkeypatch)
93 monkeypatch.setattr(os, "name", "nt")
99 monkeypatch.setattr(os, "name", "posix")
107 monkeypatch.setattr(os, "name", "posix")
116 monkeypatch.setattr(os, "name", "posix")
124 monkeypatch.setattr(os, "name", "posix")
383 reload_filesink_ctime_functions(monkeypatch)
[all …]
H A Dtest_exceptions_catch.py101 def test_has_sys_real_prefix(writer, monkeypatch): argument
113 def test_no_sys_real_prefix(writer, monkeypatch): argument
114 monkeypatch.delattr(sys, "real_prefix", raising=False)
125 def test_has_site_getsitepackages(writer, monkeypatch): argument
137 def test_no_site_getsitepackages(writer, monkeypatch): argument
149 def test_user_site_is_path(writer, monkeypatch): argument
150 monkeypatch.setattr(site, "USER_SITE", "/foo/bar/baz")
161 def test_user_site_is_none(writer, monkeypatch): argument
162 monkeypatch.setattr(site, "USER_SITE", None)
224 def test_distutils_not_installed(writer, monkeypatch): argument
[all …]
/dports/devel/py-pyinstaller/PyInstaller-3.5/tests/unit/
H A Dtest_depend_utils.py26 def __scan_code_for_ctypes(code, monkeypatch): argument
28 monkeypatch.setattr(utils, '_resolveCtypesImports',
37 def test_ctypes_CDLL_call(monkeypatch, classname): argument
39 res = __scan_code_for_ctypes(code, monkeypatch)
44 def test_ctypes_LibraryLoader(monkeypatch, classname): argument
48 res = __scan_code_for_ctypes(code, monkeypatch)
53 def test_ctypes_LibraryLoader_LoadLibrary(monkeypatch, classname): argument
55 res = __scan_code_for_ctypes(code, monkeypatch)
59 def test_ctypes_util_find_library(monkeypatch): argument
66 res = __scan_code_for_ctypes(code, monkeypatch)
/dports/www/firefox-legacy/firefox-52.8.0esr/testing/web-platform/tests/tools/pytest/doc/en/
H A Dmonkeypatch.rst5 .. currentmodule:: _pytest.monkeypatch
12 See the `monkeypatch blog post`_ for some introduction material
29 def test_mytest(monkeypatch):
49 def no_requests(monkeypatch):
62 def test_some_interaction(monkeypatch):
63 monkeypatch.setattr("os.getcwd", lambda: "/")
67 def test_some_interaction(monkeypatch):
69 monkeypatch.setattr(os, "getcwd", lambda: "/")
73 Method reference of the monkeypatch function argument
76 .. autoclass:: monkeypatch
[all …]
/dports/sysutils/ansible/ansible-4.7.0/ansible_collections/community/general/tests/unit/plugins/modules/cloud/linode/
H A Dconftest.py10 def api_key(monkeypatch): argument
11 monkeypatch.setenv('LINODE_API_KEY', 'foobar')
15 def auth(monkeypatch): argument
18 monkeypatch.setattr('linode.api.Api.test_echo', patched_test_echo)
22 def access_token(monkeypatch): argument
23 monkeypatch.setenv('LINODE_ACCESS_TOKEN', 'barfoo')
27 def no_access_token_in_env(monkeypatch): argument
29 monkeypatch.delenv('LINODE_ACCESS_TOKEN')
/dports/www/firefox-esr/firefox-91.8.0/python/mozlint/test/
H A Dtest_editor.py18 def capture_commands(monkeypatch):
23 monkeypatch.setattr(subprocess, "call", fake_subprocess_call)
51 def test_no_editor(monkeypatch, capture_commands, result):
55 monkeypatch.delenv("EDITOR", raising=False)
60 def test_no_issues(monkeypatch, capture_commands, result):
64 monkeypatch.setenv("EDITOR", "generic")
70 def test_vim(monkeypatch, capture_commands, result):
74 monkeypatch.setenv("EDITOR", "vim")
80 def test_generic(monkeypatch, capture_commands, result):
84 monkeypatch.setenv("EDITOR", "generic")
/dports/www/firefox/firefox-99.0/python/mozlint/test/
H A Dtest_editor.py18 def capture_commands(monkeypatch): argument
23 monkeypatch.setattr(subprocess, "call", fake_subprocess_call)
51 def test_no_editor(monkeypatch, capture_commands, result): argument
55 monkeypatch.delenv("EDITOR", raising=False)
60 def test_no_issues(monkeypatch, capture_commands, result): argument
64 monkeypatch.setenv("EDITOR", "generic")
70 def test_vim(monkeypatch, capture_commands, result): argument
74 monkeypatch.setenv("EDITOR", "vim")
80 def test_generic(monkeypatch, capture_commands, result): argument
84 monkeypatch.setenv("EDITOR", "generic")
/dports/mail/thunderbird/thunderbird-91.8.0/python/mozlint/test/
H A Dtest_editor.py18 def capture_commands(monkeypatch): argument
23 monkeypatch.setattr(subprocess, "call", fake_subprocess_call)
51 def test_no_editor(monkeypatch, capture_commands, result): argument
55 monkeypatch.delenv("EDITOR", raising=False)
60 def test_no_issues(monkeypatch, capture_commands, result): argument
64 monkeypatch.setenv("EDITOR", "generic")
70 def test_vim(monkeypatch, capture_commands, result): argument
74 monkeypatch.setenv("EDITOR", "vim")
80 def test_generic(monkeypatch, capture_commands, result): argument
84 monkeypatch.setenv("EDITOR", "generic")
/dports/lang/spidermonkey78/firefox-78.9.0/python/mozlint/test/
H A Dtest_editor.py18 def capture_commands(monkeypatch): argument
25 monkeypatch.setattr(subprocess, 'call', fake_subprocess_call)
51 def test_no_editor(monkeypatch, capture_commands, result): argument
55 monkeypatch.delenv('EDITOR', raising=False)
60 def test_no_issues(monkeypatch, capture_commands, result): argument
64 monkeypatch.setenv('EDITOR', 'generic')
70 def test_vim(monkeypatch, capture_commands, result): argument
74 monkeypatch.setenv('EDITOR', 'vim')
80 def test_generic(monkeypatch, capture_commands, result): argument
84 monkeypatch.setenv('EDITOR', 'generic')
/dports/lang/spidermonkey78/firefox-78.9.0/third_party/python/Click/tests/
H A Dtest_termui.py16 def test_progressbar_strip_regression(runner, monkeypatch): argument
26 monkeypatch.setattr(time, 'time', fake_clock.time)
27 monkeypatch.setattr(click._termui_impl, 'isatty', lambda _: True)
31 def test_progressbar_length_hint(runner, monkeypatch): argument
58 monkeypatch.setattr(time, 'time', fake_clock.time)
59 monkeypatch.setattr(click._termui_impl, 'isatty', lambda _: True)
64 def test_progressbar_hidden(runner, monkeypatch): argument
74 monkeypatch.setattr(time, 'time', fake_clock.time)
79 def test_choices_list_in_prompt(runner, monkeypatch): argument
111 def test_progressbar_update(runner, monkeypatch): argument
[all …]
/dports/archivers/py-borgbackup/borgbackup-1.1.17/src/borg/testsuite/
H A Dnonces.py70 def test_empty_cache_and_old_server(self, monkeypatch): argument
71 monkeypatch.setattr(nonces, 'NONCE_SPACE_RESERVATION', 0x20)
81 def test_empty_cache(self, monkeypatch): argument
82 monkeypatch.setattr(nonces, 'NONCE_SPACE_RESERVATION', 0x20)
93 def test_empty_nonce(self, monkeypatch): argument
130 def test_sync_nonce(self, monkeypatch): argument
145 def test_server_just_upgraded(self, monkeypatch): argument
160 def test_transaction_abort_no_cache(self, monkeypatch): argument
174 def test_transaction_abort_old_server(self, monkeypatch): argument
187 def test_transaction_abort_on_other_client(self, monkeypatch): argument
[all …]
/dports/devel/py-twine/twine-3.7.0/tests/
H A Dtest_package.py25 def test_sign_file(monkeypatch): argument
45 def test_sign_file_with_identity(monkeypatch): argument
65 def test_run_gpg_raises_exception_if_no_gpgs(monkeypatch): argument
76 def test_run_gpg_raises_exception_if_not_using_gpg(monkeypatch): argument
87 def test_run_gpg_falls_back_to_gpg2(monkeypatch): argument
298 def test_fips_hash_manager_md5(monkeypatch): argument
301 monkeypatch.setattr(package_file.hashlib, "md5", replaced_md5)
310 def test_fips_hash_manager_blake2(monkeypatch): argument
322 def test_fips_metadata_excludes_md5_and_blake2(monkeypatch): argument
340 def test_pkginfo_returns_no_metadata(monkeypatch): argument
[all …]
/dports/devel/py-jedi/jedi-0.18.0/test/test_api/
H A Dtest_environment.py92 def test_not_existing_virtualenv(monkeypatch): argument
95 monkeypatch.setenv('VIRTUAL_ENV', path)
99 def test_working_venv(venv_path, monkeypatch): argument
100 monkeypatch.setenv('VIRTUAL_ENV', venv_path)
134 monkeypatch.setenv('VIRTUAL_ENV', fake_python)
140 def test_get_default_environment_when_embedded(monkeypatch, virtualenv): argument
144 monkeypatch.setattr(sys, 'executable', executable_name)
145 monkeypatch.setenv('VIRTUAL_ENV', virtualenv)
150 def test_changing_venv(venv_path, monkeypatch): argument
151 monkeypatch.setitem(os.environ, 'VIRTUAL_ENV', venv_path)
[all …]
/dports/sysutils/py-ansible-base/ansible-base-2.10.15/test/units/galaxy/
H A Dtest_collection.py56 def collection_artifact(monkeypatch, tmp_path_factory): argument
59 monkeypatch.setattr(collection, 'open_url', mock_open)
63 monkeypatch.setattr(uuid, 'uuid4', mock_uuid)
292 def test_warning_extra_keys(galaxy_yml, monkeypatch): argument
350 monkeypatch.setattr(Display, 'vvv', mock_display)
392 monkeypatch.setattr(Display, 'vvv', mock_display)
429 monkeypatch.setattr(Display, 'vvv', mock_display)
662 def test_download_file(tmp_path_factory, monkeypatch): argument
1262 def test_verify_collections_tarfile(monkeypatch): argument
1276 def test_verify_collections_path(monkeypatch): argument
[all …]
/dports/www/firefox-esr/firefox-91.8.0/testing/mozbase/mozdevice/tests/
H A Dconftest.py24 def mock_command_output(monkeypatch): argument
53 monkeypatch.setattr(mozdevice.ADBDevice, "command_output", command_output_wrapper)
57 def mock_shell_output(monkeypatch): argument
93 monkeypatch.setattr(mozdevice.ADBDevice, "shell_output", shell_output_wrapper)
97 def mock_is_path_internal_storage(monkeypatch): argument
124 monkeypatch.setattr(
132 def mock_enable_run_as_for_path(monkeypatch): argument
148 monkeypatch.setattr(
154 def mock_shell_bool(monkeypatch): argument
182 monkeypatch.setattr(mozdevice.ADBDevice, "shell_bool", shell_bool_wrapper)
/dports/www/firefox/firefox-99.0/testing/mozbase/mozdevice/tests/
H A Dconftest.py24 def mock_command_output(monkeypatch): argument
53 monkeypatch.setattr(mozdevice.ADBDevice, "command_output", command_output_wrapper)
57 def mock_shell_output(monkeypatch): argument
93 monkeypatch.setattr(mozdevice.ADBDevice, "shell_output", shell_output_wrapper)
97 def mock_is_path_internal_storage(monkeypatch): argument
124 monkeypatch.setattr(
132 def mock_enable_run_as_for_path(monkeypatch): argument
148 monkeypatch.setattr(
154 def mock_shell_bool(monkeypatch): argument
182 monkeypatch.setattr(mozdevice.ADBDevice, "shell_bool", shell_bool_wrapper)
/dports/mail/thunderbird/thunderbird-91.8.0/testing/mozbase/mozdevice/tests/
H A Dconftest.py24 def mock_command_output(monkeypatch): argument
53 monkeypatch.setattr(mozdevice.ADBDevice, "command_output", command_output_wrapper)
57 def mock_shell_output(monkeypatch): argument
93 monkeypatch.setattr(mozdevice.ADBDevice, "shell_output", shell_output_wrapper)
97 def mock_is_path_internal_storage(monkeypatch): argument
124 monkeypatch.setattr(
132 def mock_enable_run_as_for_path(monkeypatch): argument
148 monkeypatch.setattr(
154 def mock_shell_bool(monkeypatch): argument
182 monkeypatch.setattr(mozdevice.ADBDevice, "shell_bool", shell_bool_wrapper)
/dports/devel/py-flynt/flynt-0.69/test/integration/
H A Dtest_cli.py58 def run_cli_test(monkeypatch, **kwargs): argument
69 monkeypatch.setattr(argparse, "ArgumentParser", argument_parser_mock)
73 def test_cli_no_args(monkeypatch, capsys): argument
77 return_code = run_cli_test(monkeypatch)
84 def test_cli_version(monkeypatch, capsys): argument
88 return_code = run_cli_test(monkeypatch, version=True)
118 def test_cli_string_quoted(monkeypatch, capsys, code_in, code_out): argument
126 return_code = run_cli_test(monkeypatch, string=True, src=[code_in])
135 def test_cli_string_unquoted(monkeypatch, capsys, code_in, code_out): argument
155 def test_cli_dry_run(monkeypatch, capsys, sample_file): argument
[all …]
/dports/sysutils/py-ansible-core/ansible-core-2.11.6/test/units/galaxy/
H A Dtest_collection_install.py227 monkeypatch.setattr(Display, 'display', mock_display)
256 monkeypatch.setattr(Display, 'display', mock_display)
711 monkeypatch.setattr(Display, 'display', mock_display)
727 def test_install_collection(collection_artifact, monkeypatch): argument
729 monkeypatch.setattr(Display, 'display', mock_display)
772 monkeypatch.setattr(Display, 'display', mock_display)
798 def test_install_collections_from_tar(collection_artifact, monkeypatch): argument
804 monkeypatch.setattr(Display, 'display', mock_display)
838 monkeypatch.setattr(Display, 'display', mock_display)
868 monkeypatch.setattr(Display, 'display', mock_display)
[all …]
/dports/devel/py-pytest/pytest-4.6.11/doc/en/
H A Dmonkeypatch.rst5 .. currentmodule:: _pytest.monkeypatch
30 def test_mytest(monkeypatch):
50 def no_requests(monkeypatch):
76 def test_partial(monkeypatch):
77 with monkeypatch.context() as m:
117 def test_upper_to_lower(monkeypatch):
119 monkeypatch.setenv("USER", "TestingUser")
123 def test_raise_exception(monkeypatch):
138 def mock_env_user(monkeypatch):
143 def mock_env_missing(monkeypatch):
[all …]

12345678910>>...78