Skip to content

Commit b650c4f

Browse files
committed
Better assert message
1 parent 1d43a75 commit b650c4f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/test_repo.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,11 @@ def test_leaking_password_in_clone_logs(self, rw_dir):
244244
password = "fakepassword1234"
245245
try:
246246
Repo.clone_from(
247-
url="https://fakeuser:{}@fakerepo.example.com/testrepo".format(password),
247+
url="https://fakeuser:{}@fakerepo.example.com/testrepo".format(
248+
password),
248249
to_path=rw_dir)
249250
except GitCommandError as err:
250-
assert password not in str(err)
251+
assert password not in str(err), "The error message '%s' should not contain the password" % err
251252

252253
@with_rw_repo('HEAD')
253254
def test_max_chunk_size(self, repo):

0 commit comments

Comments
 (0)