def METHOD_NAME(
        self,
        mock_find_executable,
        mock_makedirs,
        mock_chdir):
    mock_find_executable.return_value = self.expected_compiler
    # specific `build_arch` mocks
    with mock.patch(
            "builtins.open",
            mock.mock_open(read_data="#define ZLIB_VERSION 1.1\nfoo")
    ) as mock_open_zlib, mock.patch(
        "pythonforandroid.recipes.python3.sh.Command"
    ) as mock_sh_command, mock.patch(
        "pythonforandroid.recipes.python3.sh.make"
    ) as mock_make, mock.patch(
        "pythonforandroid.recipes.python3.sh.cp"
    ) as mock_cp:
        self.recipe.build_arch(self.arch)
    # make sure that the mocked methods are actually called
    recipe_build_dir = self.recipe.get_build_dir(self.arch.arch)
    sh_command_calls = {
        f"{recipe_build_dir}/config.guess",
        f"{recipe_build_dir}/configure",
    }
    for command in sh_command_calls:
        self.assertIn(
            mock.call(command),
            mock_sh_command.mock_calls,
        )
    mock_open_zlib.assert_called()
    self.assertEqual(mock_make.call_count, 1)
    for make_call, kw in mock_make.call_args_list:
        self.assertIn(
            f'INSTSONAME={self.recipe._libpython}', make_call
        )
    mock_cp.assert_called_with(
        "pyconfig.h", join(recipe_build_dir, 'Include'),
    )
    mock_makedirs.assert_called()
    mock_chdir.assert_called()