diff options
author | Jeff Quast <contact@jeffquast.com> | 2015-02-28 15:36:02 -0800 |
---|---|---|
committer | Jeff Quast <contact@jeffquast.com> | 2015-02-28 15:36:02 -0800 |
commit | 339d07cc7e72e50a6334ddb6b5e08cfcf8111dff (patch) | |
tree | 78bd1c30f7b1bb0c70c4b4985fc5d28e97aed183 | |
parent | fc28598e2220c2fce973485f909d41ce20b3789b (diff) | |
download | blessings-339d07cc7e72e50a6334ddb6b5e08cfcf8111dff.tar.gz |
Intermittent build fails on FreeBSD (upstream bug)
The following terminal types should be avoided on freebsd.
https://gist.github.com/jquast/7b90af251fe4000baa09
-rw-r--r-- | blessings/tests/test_sequences.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/blessings/tests/test_sequences.py b/blessings/tests/test_sequences.py index c0cafce..8d1597e 100644 --- a/blessings/tests/test_sequences.py +++ b/blessings/tests/test_sequences.py @@ -95,7 +95,6 @@ def test_stream_attr(): def test_emit_warnings_about_binpacked(): """Test known binary-packed terminals (kermit, avatar) emit a warning.""" from blessings.sequences import _BINTERM_UNSUPPORTED_MSG - from blessings._binterms import binary_terminals @as_subprocess def child(kind): @@ -115,19 +114,25 @@ def test_emit_warnings_about_binpacked(): assert 'warnings should have been emitted.' warnings.resetwarnings() - # any binary terminal should do. - child(binary_terminals[random.randrange(len(binary_terminals))]) + # Although any binary terminal should do, FreeBSD has "termcap entry bugs" + # that cause false negatives, because their underlying curses library emits + # some kind of "warning" to stderr, which our @as_subprocess decorator + # determines to be noteworthy enough to fail the test: + # https://gist.github.com/jquast/7b90af251fe4000baa09 + # + # so we chose only one of beautiful lineage: + # http://terminals.classiccmp.org/wiki/index.php/Tektronix_4207 + child(kind='tek4207-s') def test_unit_binpacked_unittest(): """Unit Test known binary-packed terminals emit a warning (travis-safe).""" import warnings - from blessings._binterms import binary_terminals from blessings.sequences import (_BINTERM_UNSUPPORTED_MSG, init_sequence_patterns) warnings.filterwarnings("error", category=UserWarning) term = mock.Mock() - term.kind = binary_terminals[random.randrange(len(binary_terminals))] + term.kind = 'tek4207-s' try: init_sequence_patterns(term) |