summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Quast <jquast@io.com>2015-01-04 00:34:35 -0800
committerJeff Quast <jquast@io.com>2015-01-04 00:34:35 -0800
commit8f264cee6c24f3405752652719f73f3d4369bd12 (patch)
tree473b8abeb2779afab883e9590d9991a1d94d1a1f
parent6d9e276115e0b5ef193a9da2b3867dd74258df14 (diff)
downloadblessings-8f264cee6c24f3405752652719f73f3d4369bd12.tar.gz
revert test paragraph, we have a bug to squash yet
-rw-r--r--blessed/tests/accessories.py32
-rw-r--r--blessed/tests/test_wrap.py4
2 files changed, 19 insertions, 17 deletions
diff --git a/blessed/tests/accessories.py b/blessed/tests/accessories.py
index a62645d..408d2e7 100644
--- a/blessed/tests/accessories.py
+++ b/blessed/tests/accessories.py
@@ -30,24 +30,24 @@ SEND_SEMAPHORE = SEMAPHORE = b'SEMAPHORE\n'
RECV_SEMAPHORE = b'SEMAPHORE\r\n'
all_xterms_params = ['xterm', 'xterm-256color']
many_lines_params = [30, 100]
-many_columns_params = [1, 25]
+many_columns_params = [1, 10]
from blessed._binterms import binary_terminals
default_all_terms = ['screen', 'vt220', 'rxvt', 'cons25', 'linux', 'ansi']
-try:
- available_terms = [
- _term.split(None, 1)[0].decode('ascii') for _term in
- subprocess.Popen(('toe', '-a'), stdout=subprocess.PIPE, close_fds=True)
- .communicate()[0].splitlines()]
- if not os.environ.get('TEST_ALLTERMS'):
- # we just pick 3 random terminal types, they're all as good as any so
- # long as they're not in the binary_terminals list.
- random.shuffle(available_terms)
- available_terms = available_terms[:3]
- all_terms_params = list(set(available_terms) - (
- set(binary_terminals) if not os.environ.get('TEST_BINTERMS')
- else set())) or default_all_terms
-except OSError:
- all_terms_params = default_all_terms
+if os.environ.get('TEST_ALLTERMS'):
+ try:
+ available_terms = [
+ _term.split(None, 1)[0].decode('ascii') for _term in
+ subprocess.Popen(('toe', '-a'),
+ stdout=subprocess.PIPE,
+ close_fds=True)
+ .communicate()[0].splitlines()]
+ except OSError:
+ all_terms_params = default_all_terms
+else:
+ available_terms = default_all_terms
+all_terms_params = list(set(available_terms) - (
+ set(binary_terminals) if not os.environ.get('TEST_BINTERMS')
+ else set())) or default_all_terms
class as_subprocess(object):
diff --git a/blessed/tests/test_wrap.py b/blessed/tests/test_wrap.py
index c253aa3..1e12060 100644
--- a/blessed/tests/test_wrap.py
+++ b/blessed/tests/test_wrap.py
@@ -68,7 +68,9 @@ def test_SequenceWrapper(all_terms, many_columns, kwargs):
# build a test paragraph, along with a very colorful version
t = TestTerminal()
pgraph = u' '.join((
- 'a', 'bc', 'vwxyz123456789ABCDEFGHIJKLMN ')) * 2
+ 'a', 'bc', 'def', 'ghij', 'klmno', 'pqrstu', 'vwxyz012',
+ '34567890A', 'BCDEFGHIJK', 'LMNOPQRSTUV', 'WXYZabcdefgh',
+ 'ijklmnopqrstu', 'vwxyz123456789', '0ABCDEFGHIJKLMN '))
pgraph_colored = u''.join([
t.color(idx % 7)(char) if char != ' ' else ' '