diff options
Diffstat (limited to 'blessings/tests.py')
-rw-r--r-- | blessings/tests.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/blessings/tests.py b/blessings/tests.py index aff3a2f..a03eb8d 100644 --- a/blessings/tests.py +++ b/blessings/tests.py @@ -9,14 +9,13 @@ All we require from the host machine is that a standard terminfo definition of xterm-256color exists. """ -from __future__ import with_statement # Make 2.5-compatible from curses import tigetstr, tparm from functools import partial -from StringIO import StringIO import sys from nose import SkipTest from nose.tools import eq_ +from six import StringIO # This tests that __all__ is correct, since we use below everything that should # be imported: @@ -229,22 +228,22 @@ def test_nice_formatting_errors(): t = TestTerminal() try: t.bold_misspelled('hey') - except TypeError, e: + except TypeError as e: assert 'probably misspelled' in e.args[0] try: t.bold_misspelled(u'hey') # unicode - except TypeError, e: + except TypeError as e: assert 'probably misspelled' in e.args[0] try: t.bold_misspelled(None) # an arbitrary non-string - except TypeError, e: + except TypeError as e: assert 'probably misspelled' not in e.args[0] try: t.bold_misspelled('a', 'b') # >1 string arg - except TypeError, e: + except TypeError as e: assert 'probably misspelled' not in e.args[0] |