Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_header_parse_error_repr():
e = PlyHeaderParseError('text', 11)
assert repr(e) == 'PlyHeaderParseError(\'text\', line=11)'
def test_header_parse_error(s, line):
with Raises(PlyHeaderParseError) as e:
PlyData.read(BytesIO(s))
assert e.exc_val.line == line
def _error(self, message="parse error"):
raise PlyHeaderParseError(message, self.lines)