diff --git a/doc/overview.rst b/doc/overview.rst index f6da2c1ba9..6a7f61ac58 100644 --- a/doc/overview.rst +++ b/doc/overview.rst @@ -108,7 +108,7 @@ Here are ways to specify ``git_config``: # Only providing 'repo' is also allowed. If this is the case, latest commit in # 'master' branch will be used. - git_config = {'repo': 'https://github.com/username/repo-with-training-scripts.git' + git_config = {'repo': 'https://github.com/username/repo-with-training-scripts.git'} The following are some examples to define estimators with Git support: diff --git a/tests/unit/test_estimator.py b/tests/unit/test_estimator.py index 2994f917b3..d56201fd74 100644 --- a/tests/unit/test_estimator.py +++ b/tests/unit/test_estimator.py @@ -897,7 +897,13 @@ def test_git_support_bad_repo_url_format(sagemaker_session): assert "returned non-zero exit status" in str(error) -def test_git_support_git_clone_fail(sagemaker_session): +@patch( + "subprocess.check_call", + side_effect=subprocess.CalledProcessError( + returncode=1, cmd="git clone https://github.com/aws/no-such-repo.git" + ), +) +def test_git_support_git_clone_fail(check_call, sagemaker_session): git_config = {"repo": "https://github.com/aws/no-such-repo.git", "branch": BRANCH} fw = DummyFramework( entry_point="entry_point",