forked from erikrose/blessings
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix for term.split_seqs('term.right(3)') #197
* Bugfix for term.split_seqs('term.right(3)') In version 1.18.0 and earlier, >> term.split_seqs(term.move_right(333) + 'xyz', maxsplit=1) ['\x1b[333C', '333', 'xyz'] This is a bug, it duplicates the matched parameter, this is now corrected: ['\x1b[3C', 'xyz'] Previously, we documented "same arguments as "re.split", so we must also implement maxsplit and flags. Also, - fix flake8 linting of tests by moving fixtures to conftest.py, fixes "unused" or "re-definition from import" errors. - version stamp blessed/__init__.py like a codegen step i guess - remove run_codecov.py, its been fixed upstream codecov/codecov-python#158 (comment)
- Loading branch information
Showing
17 changed files
with
159 additions
and
115 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# std imports | ||
import os | ||
import platform | ||
import subprocess | ||
|
||
# 3rd party | ||
import pytest | ||
|
||
all_terms_params = 'xterm screen ansi vt220 rxvt cons25 linux'.split() | ||
many_lines_params = [40, 80] | ||
# we must test a '1' column for conditional in _handle_long_word | ||
many_columns_params = [1, 10] | ||
|
||
if os.environ.get('TEST_FULL'): | ||
try: | ||
all_terms_params = [ | ||
# use all values of the first column of data in output of 'toe -a' | ||
_term.split(None, 1)[0] for _term in | ||
subprocess.Popen(('toe', '-a'), | ||
stdout=subprocess.PIPE, | ||
close_fds=True) | ||
.communicate()[0].splitlines()] | ||
except OSError: | ||
pass | ||
elif platform.system() == 'Windows': | ||
all_terms_params = ['vtwin10', ] | ||
elif os.environ.get('TEST_QUICK'): | ||
all_terms_params = 'xterm screen ansi linux'.split() | ||
|
||
|
||
if os.environ.get('TEST_QUICK'): | ||
many_lines_params = [80, ] | ||
many_columns_params = [25, ] | ||
|
||
|
||
@pytest.fixture(params=all_terms_params) | ||
def all_terms(request): | ||
"""Common kind values for all kinds of terminals.""" | ||
return request.param | ||
|
||
|
||
@pytest.fixture(params=many_lines_params) | ||
def many_lines(request): | ||
"""Various number of lines for screen height.""" | ||
return request.param | ||
|
||
|
||
@pytest.fixture(params=many_columns_params) | ||
def many_columns(request): | ||
"""Various number of columns for screen width.""" | ||
return request.param |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.