How to use the plyfile.PlyHeaderParseError function in plyfile

To help you get started, we’ve selected a few plyfile examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dranjan / python-plyfile / test / test_plyfile.py View on Github external
def test_header_parse_error_repr():
    e = PlyHeaderParseError('text', 11)
    assert repr(e) == 'PlyHeaderParseError(\'text\', line=11)'
github dranjan / python-plyfile / test / test_plyfile.py View on Github external
def test_header_parse_error(s, line):
    with Raises(PlyHeaderParseError) as e:
        PlyData.read(BytesIO(s))
    assert e.exc_val.line == line
github dranjan / python-plyfile / plyfile.py View on Github external
def _error(self, message="parse error"):
        raise PlyHeaderParseError(message, self.lines)