diff --git a/tests/unit/package_managers/bundler/test_main.py b/tests/unit/package_managers/bundler/test_main.py index 870a28fcc..38e4f00e6 100644 --- a/tests/unit/package_managers/bundler/test_main.py +++ b/tests/unit/package_managers/bundler/test_main.py @@ -119,7 +119,7 @@ def test_get_main_package_name_and_version_from_repo_without_origin( assert "Failed to extract package name from origin remote" in exc_info.value.friendly_msg() -def test__prepare_for_hermetic_build_injects_necessary_variable_into_empty_config( +def test_prepare_for_hermetic_build_injects_necessary_variable_into_empty_config( rooted_tmp_path: RootedPath, ) -> None: expected_config_location = rooted_tmp_path.join_within_root(".bundle/config").path @@ -141,7 +141,7 @@ def test__prepare_for_hermetic_build_injects_necessary_variable_into_empty_confi assert result.template == expected_config_contents -def test__prepare_for_hermetic_build_injects_necessary_variable_into_existing_config( +def test_prepare_for_hermetic_build_injects_necessary_variable_into_existing_config( rooted_tmp_path: RootedPath, ) -> None: expected_config_location = rooted_tmp_path.join_within_root(".bundle/config").path @@ -173,7 +173,7 @@ def test__prepare_for_hermetic_build_injects_necessary_variable_into_existing_co assert result.template == existing_preamble + expected_config_contents -def test__prepare_for_hermetic_build_injects_necessary_variable_into_existing_alternate_config( +def test_prepare_for_hermetic_build_injects_necessary_variable_into_existing_alternate_config( rooted_tmp_path: RootedPath, ) -> None: expected_alternate_config_location = rooted_tmp_path.join_within_root("alternate/config").path @@ -210,7 +210,7 @@ def test__prepare_for_hermetic_build_injects_necessary_variable_into_existing_al assert result.template == existing_preamble + expected_alternate_config_contents -def test__prepare_for_hermetic_build_ignores_a_directory_in_place_of_config( +def test_prepare_for_hermetic_build_ignores_a_directory_in_place_of_config( rooted_tmp_path: RootedPath, ) -> None: expected_config_location = rooted_tmp_path.join_within_root(".bundle/config").path diff --git a/tests/unit/package_managers/test_gomod.py b/tests/unit/package_managers/test_gomod.py index 6ec20c7c5..c256cc79b 100644 --- a/tests/unit/package_managers/test_gomod.py +++ b/tests/unit/package_managers/test_gomod.py @@ -2455,7 +2455,7 @@ class TestGoWork: ], ) @mock.patch("cachi2.core.package_managers.gomod.run_cmd") - def test__init__( + def test_init__( self, mock_run: mock.Mock, rooted_tmp_path: RootedPath, @@ -2474,7 +2474,7 @@ def test__init__( assert go_work.data == {} @mock.patch("cachi2.core.package_managers.gomod.run_cmd") - def test__init__fail(self, mock_run: mock.Mock, rooted_tmp_path: RootedPath) -> None: + def test_init__fail(self, mock_run: mock.Mock, rooted_tmp_path: RootedPath) -> None: mock_run.return_value = "/a/random/path/go.work" with pytest.raises(PathOutsideRoot): GoWork(rooted_tmp_path) @@ -2487,7 +2487,7 @@ def test__init__fail(self, mock_run: mock.Mock, rooted_tmp_path: RootedPath) -> ], ) @mock.patch("cachi2.core.package_managers.gomod.run_cmd") - def test__bool__( + def test_bool__( self, mock_run: mock.Mock, rooted_tmp_path: RootedPath, go_work_env: str, expected: bool ) -> None: if go_work_env: diff --git a/tests/unit/package_managers/test_rpm.py b/tests/unit/package_managers/test_rpm.py index 1255c95a8..65a44fc94 100644 --- a/tests/unit/package_managers/test_rpm.py +++ b/tests/unit/package_managers/test_rpm.py @@ -706,6 +706,6 @@ def test_write( pytest.param(False, ssl.CERT_NONE, id="host_verification_disabled_when_verify_false"), ], ) -def test__get_ssl_context_verify_mode(ssl_verify: bool, expected_mode: int) -> None: +def test_get_ssl_context_verify_mode(ssl_verify: bool, expected_mode: int) -> None: ssl_context = _get_ssl_context(SSLOptions(ssl_verify=ssl_verify)) assert ssl_context.verify_mode is expected_mode diff --git a/tests/unit/package_managers/yarn_classic/test_resolver.py b/tests/unit/package_managers/yarn_classic/test_resolver.py index 44be48ad4..83462fb41 100644 --- a/tests/unit/package_managers/yarn_classic/test_resolver.py +++ b/tests/unit/package_managers/yarn_classic/test_resolver.py @@ -77,22 +77,22 @@ @pytest.mark.parametrize("url", VALID_TARBALL_URLS) -def test__is_tarball_url_can_parse_correct_tarball_urls(url: str) -> None: +def test_is_tarball_url_can_parse_correct_tarball_urls(url: str) -> None: assert _is_tarball_url(url) @pytest.mark.parametrize("url", INVALID_TARBALL_URLS) -def test__is_tarball_url_rejects_incorrect_tarball_urls(url: str) -> None: +def test_is_tarball_url_rejects_incorrect_tarball_urls(url: str) -> None: assert not _is_tarball_url(url) @pytest.mark.parametrize("url", VALID_GIT_URLS) -def test__is_git_url_can_parse_correct_git_urls(url: str) -> None: +def test_is_git_url_can_parse_correct_git_urls(url: str) -> None: assert _is_git_url(url) @pytest.mark.parametrize("url", INVALID_GIT_URLS) -def test__is_git_url_rejects_incorrect_git_urls(url: str) -> None: +def test_is_git_url_rejects_incorrect_git_urls(url: str) -> None: assert not _is_git_url(url) @@ -103,11 +103,11 @@ def test__is_git_url_rejects_incorrect_git_urls(url: str) -> None: "https://registry.yarnpkg.com/chai/-/chai-4.2.0.tgz", ], ) -def test__is_from_npm_registry_can_parse_correct_registry_urls(url: str) -> None: +def test_is_from_npm_registry_can_parse_correct_registry_urls(url: str) -> None: assert _is_from_npm_registry(url) -def test__is_from_npm_registry_can_parse_incorrect_registry_urls() -> None: +def test_is_from_npm_registry_can_parse_incorrect_registry_urls() -> None: assert not _is_from_npm_registry("https://example.org/fecha.tar.gz") @@ -246,7 +246,7 @@ def test_create_package_from_pyarn_package_fail_unexpected_format( @mock.patch( "cachi2.core.package_managers.yarn_classic.resolver._YarnClassicPackageFactory.create_package_from_pyarn_package" ) -def test__get_packages_from_lockfile( +def test_get_packages_from_lockfile( mock_create_package: mock.Mock, rooted_tmp_path: RootedPath ) -> None: # Setup lockfile instance @@ -316,7 +316,7 @@ def test_resolve_packages( assert list(output) == expected_output -def test__get_main_package(rooted_tmp_path: RootedPath) -> None: +def test_get_main_package(rooted_tmp_path: RootedPath) -> None: package_json = PackageJson( _path=rooted_tmp_path.join_within_root("package.json"), _data={"name": "foo", "version": "1.0.0"}, @@ -331,7 +331,7 @@ def test__get_main_package(rooted_tmp_path: RootedPath) -> None: assert output == expected_output -def test__get_main_package_no_name(rooted_tmp_path: RootedPath) -> None: +def test_get_main_package_no_name(rooted_tmp_path: RootedPath) -> None: package_json = PackageJson( _path=rooted_tmp_path.join_within_root("package.json"), _data={}, @@ -344,7 +344,7 @@ def test__get_main_package_no_name(rooted_tmp_path: RootedPath) -> None: _get_main_package(rooted_tmp_path, package_json) -def test__get_workspace_packages(rooted_tmp_path: RootedPath) -> None: +def test_get_workspace_packages(rooted_tmp_path: RootedPath) -> None: workspace_path = rooted_tmp_path.join_within_root("foo") workspace_path.path.mkdir()