-
Notifications
You must be signed in to change notification settings - Fork 105
Fix _getdimensions for when stdout is redirected #219
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueyed
added a commit
to blueyed/pytest
that referenced
this pull request
Apr 5, 2019
This might work better then the one from the stdlib [1], and ensures to use a consistent value for formatting the ini values etc. 1: pytest-dev/py#219
blueyed
added a commit
to blueyed/pytest
that referenced
this pull request
Apr 5, 2019
This might work better then the one from the stdlib [1], and ensures to use a consistent value for formatting the ini values etc. 1: pytest-dev/py#219
2 tasks
Ping. Pytest could benefit from it. |
btw: it was changed from stdin to stdout in pytest-dev/pytest@ed8e243 |
This uses an improved version of `shutil.get_terminal_width` [1], and also improves the code for before Python 3.3. 1: https://bugs.python.org/issue14841, python/cpython#12697
7d62c05
to
34f716f
Compare
blueyed
added a commit
to blueyed/pytest
that referenced
this pull request
Aug 17, 2019
This might work better then the one from the stdlib [1], and ensures to use a consistent value for formatting the ini values etc. 1: pytest-dev/py#219
Codecov Report
@@ Coverage Diff @@
## master #219 +/- ##
==========================================
+ Coverage 82.07% 82.07% +<.01%
==========================================
Files 55 55
Lines 10153 10198 +45
Branches 1141 1149 +8
==========================================
+ Hits 8333 8370 +37
- Misses 1556 1560 +4
- Partials 264 268 +4 |
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #219 +/- ##
==========================================
+ Coverage 82.07% 82.07% +<.01%
==========================================
Files 55 55
Lines 10153 10198 +45
Branches 1141 1149 +8
==========================================
+ Hits 8333 8370 +37
- Misses 1556 1560 +4
- Partials 264 268 +4 |
blueyed
added a commit
to blueyed/pytest
that referenced
this pull request
Aug 17, 2019
This might work better then the one from the stdlib [1], and ensures to use a consistent value for formatting the ini values etc. 1: pytest-dev/py#219
blueyed
added a commit
to blueyed/pytest
that referenced
this pull request
Aug 17, 2019
`argparse.HelpFormatter` looks at `$COLUMNS` only, falling back to a default of 80. `py.io.get_terminal_width()` is smarter there, and could even work better with pytest-dev/py#219. This ensures to use a consistent value for formatting the ini values etc.
blueyed
added a commit
to blueyed/pytest
that referenced
this pull request
Nov 1, 2019
Will take this into pytest (blueyed/pytest#41), as suggested in pytest-dev/pytest#5056. |
blueyed
added a commit
to blueyed/pytest
that referenced
this pull request
Nov 1, 2019
blueyed
added a commit
to blueyed/pytest
that referenced
this pull request
Nov 1, 2019
This uses an improved version of `shutil.get_terminal_width`, mainly to look at stdin, stderr, and stdout. Ref: https://bugs.python.org/issue14841 Ref: python/cpython#12697 Rejected/stalled in pylib: pytest-dev/py#219 Suggested to move into pytest in pytest-dev#5056.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This uses an improved version of
shutil.get_terminal_width
[1], andalso improves the code for before Python 3.3.
1: https://bugs.python.org/issue14841,
python/cpython#12697