diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2022-03-04 15:54:22 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2022-03-04 15:54:22 +0000 |
| commit | e61bd1ea93dcbc0ceaba0c8fbb3312c54efaaa0a (patch) | |
| tree | 9a3d67e207c783186d97a8500034c556044c53d5 /docutils/test/test_io.py | |
| parent | fb90874a991c64da4340b1f09badbf846ba6152b (diff) | |
| download | docutils-e61bd1ea93dcbc0ceaba0c8fbb3312c54efaaa0a.tar.gz | |
Ensure at least two spaces before inline comment.
flake 8 rule E261
Exceptions for modules sheduled for removal or with
3rd-party origin and for data collections.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9021 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test/test_io.py')
| -rwxr-xr-x | docutils/test/test_io.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/docutils/test/test_io.py b/docutils/test/test_io.py index 8798b9d78..7efbe5717 100755 --- a/docutils/test/test_io.py +++ b/docutils/test/test_io.py @@ -66,8 +66,8 @@ class HelperTests(unittest.TestCase): self.assertEqual(io.check_encoding(mock_stdout, 'UTF-9'), None) def test_error_string(self): - us = '\xfc' # bytes(us) fails - bs = b'\xc3\xbc' # str(bs) returns repr(bs) + us = '\xfc' # bytes(us) fails + bs = b'\xc3\xbc' # str(bs) returns repr(bs) self.assertEqual('Exception: spam', io.error_string(Exception('spam'))) @@ -224,7 +224,7 @@ class ErrorOutputTests(unittest.TestCase): self.assertEqual(e.destination, sys.stderr) def test_bbuf(self): - buf = BBuf() # buffer storing byte string + buf = BBuf() # buffer storing byte string e = io.ErrorOutput(buf, encoding='ascii') # write byte-string as-is e.write(b'b\xfc') @@ -242,11 +242,12 @@ class ErrorOutputTests(unittest.TestCase): self.assertEqual(buf.getvalue(), b'b\xfc u\\xfc e\\xfc u\xc3\xbc') def test_ubuf(self): - buf = UBuf() # buffer only accepting unicode string + buf = UBuf() # buffer only accepting unicode string # decode of binary strings e = io.ErrorOutput(buf, encoding='ascii') e.write(b'b\xfc') - self.assertEqual(buf.getvalue(), 'b\ufffd') # use REPLACEMENT CHARACTER + # use REPLACEMENT CHARACTER + self.assertEqual(buf.getvalue(), 'b\ufffd') # write Unicode string and Exceptions with Unicode args e.write(' u\xfc') self.assertEqual(buf.getvalue(), 'b\ufffd u\xfc') |
