Skip to content
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

Ignore FileNotFoundError when guessing project name. #76

Merged
merged 4 commits into from
May 3, 2017
Merged

Ignore FileNotFoundError when guessing project name. #76

merged 4 commits into from
May 3, 2017

Conversation

jad-b
Copy link
Contributor

@jad-b jad-b commented Apr 27, 2017

If the host system (or container) is missing programs like 'git' or 'hg', a FileNotFoundError is raised, which crashes the process. This patch adds this error to the list of continuable exceptions.

The tox tests pass against python3.5 & 2.7; waiting on Travis to verify the rest.

  py35: commands succeeded
  py27: commands succeeded
  congratulations :)

If the host system (or container) is missing programs like 'git' or 'hg', a
FileNotFoundError is raised. This patch adds this to the list of continuable
exceptions.
@ionelmc
Copy link
Owner

ionelmc commented Apr 27, 2017

Thanks, good catch. Perhaps add yourself to AUTHORS.rst?

@jad-b
Copy link
Contributor Author

jad-b commented Apr 27, 2017

Seems small, but happy to be a part.

BTW, very excited to find this package. Always great to have your expectations far exceeded when looking for a solution to your problem.

@ionelmc
Copy link
Owner

ionelmc commented Apr 28, 2017

Wouldn't want people thinking contributions aren't valued. Any contributions :)

Also, it turns out FileNotFoundError ain't available on Python 2. Hmmm

@jad-b
Copy link
Contributor Author

jad-b commented Apr 28, 2017

Really...that raises questions about it passing py27 locally.

A quick trial of the same logic in 2.7.12 raises the more generic OSError, which is a parent to FileNotFoundError in python 3. I can update the exception type, at the small cost of catching additional (but unlikely) sibling exceptions.

@codecov-io
Copy link

Codecov Report

Merging #76 into master will decrease coverage by 1.53%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #76      +/-   ##
=========================================
- Coverage   77.73%   76.2%   -1.54%     
=========================================
  Files          16      16              
  Lines        1698    1698              
  Branches      303     303              
=========================================
- Hits         1320    1294      -26     
- Misses        316     340      +24     
- Partials       62      64       +2
Impacted Files Coverage Δ
src/pytest_benchmark/utils.py 76.7% <100%> (-4.71%) ⬇️
src/pytest_benchmark/timers.py 74.19% <0%> (-6.46%) ⬇️
src/pytest_benchmark/logger.py 78.43% <0%> (-3.93%) ⬇️
src/pytest_benchmark/stats.py 90.54% <0%> (-1.36%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f4a722f...ba79287. Read the comment docs.

@ionelmc ionelmc merged commit 120ae53 into ionelmc:master May 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants