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

Hint for possible signal upon InvocationError #766

Merged
merged 14 commits into from Feb 18, 2018
Merged

Conversation

@ederag
Copy link
Contributor

@ederag ederag commented Feb 16, 2018

This is a follow up to issue #760, with changes outlined in #760 (comment).
An indication for the potential signal received is given, with the method suggested by @asottile in #760 (comment).

Tests have been reworked with a new dependency: pytest-mock. This mainly allowed to

  • remove 1 out of 3 slow tests in test_z_cmdline.py.
  • keep code coverage with negligible increase in testing time, while adding tests for different platforms.
    indeed, the signal hint is given only on posix systems.
    monkeypatch has been used to fake system: windows (os.name == 'nt') or posix (os.name == 'posix')

Should this PR be accepted, please merge squashing all commits into a single one, with message
hint for possible signal upon InvocationError + better tests.

  • wrote descriptive pull request text
  • added/updated test(s)
  • updated/extended the documentation
  • added relevant issue keyword in message body
  • added news fragment in changelog folder
@codecov
Copy link

@codecov codecov bot commented Feb 16, 2018

Codecov Report

Merging #766 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #766      +/-   ##
==========================================
+ Coverage   94.82%   94.84%   +0.01%     
==========================================
  Files          11       11              
  Lines        2397     2405       +8     
==========================================
+ Hits         2273     2281       +8     
  Misses        124      124
Impacted Files Coverage Δ
tox/__init__.py 95.91% <100%> (+0.79%) ⬆️

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 13beb8b...34cf41e. Read the comment docs.

@ederag
Copy link
Contributor Author

@ederag ederag commented Feb 16, 2018

The appveyor tests failed with

>           assert expected_command_arg in call_command
E           assert 'python -c import sys; sys.exit(6)' in "'c:\\\\users\\\\appveyor\\\\appdata\\\\local\\\\temp\\\\1\\\\pytest-0\\\\test_exit_code_6_0\\\\foo\\\\.tox\\\\foo\\\\Scripts\\\\python.EXE -c import sys; sys.exit(6)'"

The command python given in tox.ini has been changed to python.EXE.
Is there a way to get the actual command ? result = cmd() does not contain this.
Meanwhile, just removing "python" from expected_command_arg.

@gaborbernat gaborbernat merged commit 3ed55fb into tox-dev:master Feb 18, 2018
4 checks passed
@ederag
Copy link
Contributor Author

@ederag ederag commented Feb 18, 2018

@gaborbernat thanks for merging.
But I would have left some time for @asottile to review this request too. @asottile, if you find some improvements, please comment here, and I'll be ready to file another PR.

And the commit message could have been clearer:

Should this PR be accepted, please merge squashing all commits into a single one, with message
hint for possible signal upon InvocationError + better tests.

Or was it not possible with github ?

@ederag ederag deleted the exitcode branch Feb 18, 2018
@gaborbernat
Copy link
Member

@gaborbernat gaborbernat commented Feb 18, 2018

It's a squash merge on master 👍

@ederag
Copy link
Contributor Author

@ederag ederag commented Feb 18, 2018

@gaborbernat Isn't it possible on github to do the equivalent of
git merge --squash -m "hint for possible signal upon InvocationError + better tests" ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants