Skip to content

Commit

Permalink
test_utils.py: fix messages in pytest.skip()
Browse files Browse the repository at this point in the history
  • Loading branch information
thesamesam authored and ionelmc committed Feb 23, 2022
1 parent 996dbe5 commit 4a99afe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ Authors
* Miroslav Šedivý - https://github.com/eumiro
* Dimitris Rozakis - https://github.com/dimrozakis
* Friedrich Delgado - https://github.com/TauPan
* Sam James - https://github.com/thesamesam
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog
=========

3.4.3 (????-??-??)
------------------
* Fix skipping test in `test_utils.py` if appropriate VCS not available. Also fix typo.
Contributed by Sam James in `#211 <https://github.com/ionelmc/pytest-benchmark/pull/211>`_.

3.4.2 (2021-06-15)
------------------

Expand Down
4 changes: 2 additions & 2 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def crazytestdir(request, testdir):
def scm(request, testdir):
scm = request.param
if not distutils.spawn.find_executable(scm):
pytest.skip("%r not availabe on $PATH")
pytest.skip("%r not available on $PATH" % (scm,))
subprocess.check_call([scm, 'init', '.'])
if scm == 'git':
subprocess.check_call('git config user.email you@example.com'.split())
Expand Down Expand Up @@ -157,7 +157,7 @@ def test_get_project_name(scm, set_remote, testdir):
assert get_project_name().startswith("test_get_project_name")
return
if not distutils.spawn.find_executable(scm):
pytest.skip("%r not availabe on $PATH")
pytest.skip("%r not available on $PATH" % (scm,))
subprocess.check_call([scm, 'init', '.'])
if scm == 'git' and set_remote:
subprocess.check_call(['git', 'config', 'remote.origin.url', set_remote])
Expand Down

0 comments on commit 4a99afe

Please sign in to comment.