Skip to content

fix: prompts in test_estimator.py::test_git_support_git_clone_fail #894

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
8 changes: 7 additions & 1 deletion tests/unit/test_estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down