pip/tests/unit
Stéphane Bidoul (ACSONE) 0e1e0ef566 _should_cache does not depend on check_binary_allowed
_should_cache is only called by _get_cache_dir.

In pip install mode, _get_cache_dir is never called when
check_binary_allowed returns False because in that case
should_build_for_install_command has returned False before
and the build was skipped.

In pip wheel mode, check_binary_allowed always returns True
(because it is not passed to the build function).

So _should_cache can use _always_true for check_binary_allowed.

*Alternative*

Alternatively, we could have passed check_binary_allowed
to build in pip wheel mode. The only difference is that wheels built
locally from *legacy* packages would then not be cached,
when pip wheel is used with --no-binary.
2020-01-20 10:41:48 +01:00
..
__init__.py break up tests dir into data, unit tests, and functional tests 2013-05-29 13:41:12 -07:00
test_appdirs.py Default to /etc/xdg if XDG_CONFIG_DIRS if empty 2019-12-23 14:33:17 +08:00
test_base_command.py Add some handle_pip_version_check() tests. 2019-08-07 23:14:46 -07:00
test_build_env.py Skip all failing tests when using venv 2019-11-05 23:02:45 +05:30
test_cache.py Remove redundant expanduser in WheelCache 2020-01-08 08:02:29 +01:00
test_check.py Sort imports as per newer isort 2018-06-27 12:53:31 +05:30
test_cmdoptions.py Move make_search_scope() to outdated.py. 2019-09-18 00:48:48 -07:00
test_collector.py Change CollectedLinks to store project_urls. 2019-11-10 21:27:00 -05:00
test_command_install.py Remove now useless build_wheels function 2020-01-05 23:52:40 +01:00
test_commands.py Move outdated outside utils and rename (pypa/pip#6532) 2019-09-30 09:56:44 +02:00
test_compat.py Use USERPROFILE in expanduser test 2020-01-12 19:44:43 -05:00
test_configuration.py Move config files locations inside a function (#6736) 2019-07-20 22:29:24 +02:00
test_finder.py Use packaging.tags.Tag in place of Tuple 2020-01-07 01:42:42 -05:00
test_format_control.py Only import a Command class when it is actually needed. 2019-07-26 23:30:26 -04:00
test_index.py Update references to collector.py 2019-10-19 22:24:53 +05:30
test_legacy_resolve.py Change isort multi_line_output to 3 2019-07-22 10:15:27 +05:30
test_link.py Add explicit test for hg+file 2019-09-22 11:06:07 -04:00
test_locations.py Align interface of tests.lib.path.Path.mkdir with pathlib.Path.mkdir. 2019-10-06 21:55:10 -04:00
test_logging.py Change isort multi_line_output to 3 2019-07-22 10:15:27 +05:30
test_models.py Rename InstallationCandidate.{project -> name} 2019-11-11 11:37:53 +05:30
test_models_wheel.py Use packaging.tags.Tag in place of Tuple 2020-01-07 01:42:42 -05:00
test_network_download.py Move parse_content_disposition to network.download 2019-12-04 18:31:53 -05:00
test_network_session.py Normalize style 2019-09-27 01:03:47 -04:00
test_networking_auth.py Move helper mock classes to dedicated module 2019-12-04 18:30:21 -05:00
test_networking_cache.py Move SafeFileCache to network.cache. 2019-09-21 16:24:31 -04:00
test_operations_prepare.py Make download_http_url existing bad file test functional 2019-12-13 20:30:45 -05:00
test_options.py Add tests for global path options 2020-01-02 18:58:42 +08:00
test_packaging.py Add some tests for check_requires_python(). 2019-05-22 09:05:37 -07:00
test_pep425tags.py Remove unused abi functions 2020-01-07 19:01:05 -05:00
test_pep517.py Enforce requirement format in build-system.requires 2019-11-09 20:58:27 -05:00
test_req.py Remove unused arguments 2019-12-05 20:29:43 -05:00
test_req_file.py Make session required in pip._internal.req.req_file functions 2019-11-03 20:49:11 -05:00
test_req_install.py Rename {build_location -> ensure_build_location} 2019-09-15 22:09:34 +05:30
test_req_uninstall.py Add failing test for StashedUninstallPathSet symlink 2019-08-24 23:39:05 +02:00
test_search_scope.py Add SearchScope class. 2019-06-18 00:47:10 -07:00
test_self_check_outdated.py Import InstallationCandidate more directly 2019-10-19 22:22:11 +05:30
test_target_python.py Make versions argument singular for pep425tags.get_supported() 2019-11-12 20:58:44 -05:00
test_urls.py Move path_to_url() to utils/urls.py. 2019-09-24 02:01:52 -07:00
test_utils.py Remove unused glibc functions 2020-01-07 19:01:00 -05:00
test_utils_distutils_args.py Add distutils args helpers 2019-11-30 17:39:56 -05:00
test_utils_filesystem.py Ignore errors copying socket files for source installs (in Python 3). (#6844) 2019-08-21 02:19:02 -07:00
test_utils_pkg_resources.py Add DictMetadata for adapting zip data to Distribution 2020-01-04 20:49:41 -05:00
test_utils_subprocess.py Move tests for utils.subprocess to dedicated file 2019-09-30 11:42:08 +05:30
test_utils_temp_dir.py Manage temp directory deletion centrally 2020-01-10 11:08:05 +01:00
test_utils_unpacking.py Address review comments 2019-09-24 22:43:06 -04:00
test_utils_virtualenv.py Correctly ignore system site-packages for venv 2019-11-05 14:45:08 +05:30
test_utils_wheel.py Parameterize wheel file path for metadata extraction 2020-01-04 20:50:17 -05:00
test_vcs.py Add need_svn decorator for tests which require svn 2019-10-15 17:22:16 +05:30
test_vcs_mercurial.py Hide security-sensitive strings in VCS command log messages (#6890) 2019-08-21 03:22:57 -07:00
test_wheel.py Move parse_wheel and supporting functions to utils.wheel 2020-01-04 23:11:51 +01:00
test_wheel_builder.py _should_cache does not depend on check_binary_allowed 2020-01-20 10:41:48 +01:00