Added test case for CCITTFaxDecoder (#700)
* array.array.tostring -> array.array.tobytes The tostring method has been deprecated since Python 3.2 and was removed altogether in 3.9. In Python 3.2 the method was renamed to "tobytes" Will close #641 * changelog entry * test for tobytes * Fix CHANGELOG.md * Update CHANGELOG.md to PR that I can push on * Simplify tests Co-authored-by: Forest Gregg <fgregg@uchicago.edu>pull/659/head^2
parent
10f6fb40c2
commit
b82229245a
|
@ -1,6 +1,6 @@
|
|||
from nose.tools import assert_equal
|
||||
|
||||
from pdfminer.ccitt import CCITTG4Parser
|
||||
from pdfminer.ccitt import CCITTG4Parser, CCITTFaxDecoder
|
||||
|
||||
|
||||
class TestCCITTG4Parser():
|
||||
|
@ -153,3 +153,11 @@ class TestCCITTG4Parser():
|
|||
parser._do_vertical(1)
|
||||
assert_equal(parser._get_bits(), '00000001')
|
||||
return
|
||||
|
||||
|
||||
class TestCCITTFaxDecoder:
|
||||
def test_b1(self):
|
||||
decoder = CCITTFaxDecoder(5)
|
||||
decoder.output_line(0, b'0')
|
||||
assert_equal(decoder.close(), b'\x80')
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue