diff options
author | David O'Shea <doshea@doshea-centos-x86-64.adl.quantum.com> | 2014-08-01 17:09:32 +0930 |
---|---|---|
committer | David O'Shea <doshea@doshea-centos-x86-64.adl.quantum.com> | 2014-08-01 17:09:32 +0930 |
commit | 6236c1406d91b5174def54c3a1441391ab29a1c2 (patch) | |
tree | e9f9db5b83b5ec7359c825968b98701a61341851 /tests/test_ansi.py | |
parent | db34b8fed2c21b8b790d2710fde1004d49c8f00e (diff) | |
download | pexpect-git-6236c1406d91b5174def54c3a1441391ab29a1c2.tar.gz |
Rename codec and codec_errors to encoding and encoding_errors respectively.
Diffstat (limited to 'tests/test_ansi.py')
-rwxr-xr-x | tests/test_ansi.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_ansi.py b/tests/test_ansi.py index 48d92a8..4806bff 100755 --- a/tests/test_ansi.py +++ b/tests/test_ansi.py @@ -157,7 +157,7 @@ class ansiTestCase (PexpectTestCase.PexpectTestCase): characters, where the encoding of each character consists of multiple bytes, the characters are correctly decoded. Incremental decoding is also tested.""" - s = ANSI.ANSI(2, 10, codec='utf-8') + s = ANSI.ANSI(2, 10, encoding='utf-8') # This is the UTF-8 encoding of the UCS character "HOURGLASS" # followed by the UTF-8 encoding of the UCS character # "KEYBOARD". These characters can't be encoded in cp437 or @@ -175,7 +175,7 @@ class ansiTestCase (PexpectTestCase.PexpectTestCase): def test_unicode(self): """Test passing in of a unicode string.""" - s = ANSI.ANSI(2, 10, codec="utf-8") + s = ANSI.ANSI(2, 10, encoding="utf-8") s.write(u'\u231b\u2328') assert unicode(s) == u'\u231b\u2328 \n ' assert bytes(s) == b'\xe2\x8c\x9b\xe2\x8c\xa8 \n ' @@ -187,7 +187,7 @@ class ansiTestCase (PexpectTestCase.PexpectTestCase): def test_decode_error(self): """Test that default handling of decode errors replaces the invalid characters.""" - s = ANSI.ANSI(2, 10, codec="ascii") + s = ANSI.ANSI(2, 10, encoding="ascii") s.write(b'\xff') # a non-ASCII character # In unicode, the non-ASCII character is replaced with # REPLACEMENT CHARACTER. |