Exemplo n.º 1
0
 def test_line_endings_only_CR(self):
     assert (list(synced_bytes_loader(BytesIO(b"0\r1\r0\r2\r"))) == []
             ), "MacOS prior to MacOS X line endings CR are not supported."
    def test_line_endings_only_CR(self):
        with pytest.raises(const.DXFStructureError):
            list(bytes_loader(BytesIO(b"0\r1\r0\r2\r")))

        assert list(synced_bytes_loader(BytesIO(b"0\r1\r0\r2\r"))) == [], \
            "MacOS prior to MacOS X line endings CR are not supported."
Exemplo n.º 3
0
def test_out_of_sync_tags():
    result = list(synced_bytes_loader(BytesIO(OUT_OF_SYNC_TAGS.encode())))
    assert len(result) == 10
Exemplo n.º 4
0
def load_synced_bytes():
    with open(BIG_FILE, 'rb') as fp:
        list(synced_bytes_loader(fp))