def test_base_exceptions_with_file_and_line() -> None: """Test the base exception class with file and line.""" loc = location.Location(file_name="/foo/bar", line_number=42) e = ex.CleanRoomError("message", location=loc) assert str(e) == "Error in /foo/bar:42: message"
def test_base_exceptions_with_location() -> None: """Test the base exception class with file.""" loc = location.Location(file_name="/foo/bar") e = ex.CleanRoomError("message", location=loc) assert str(e) == "Error in /foo/bar: message"
def test_base_exceptions() -> None: """Test the base exception class.""" e = ex.CleanRoomError("message") assert str(e) == "Error: message"
def test_base_exceptions_multi_args() -> None: """Test the base exception class.""" e = ex.CleanRoomError("message", "something") assert str(e) == "Error: ('message', 'something')"
def test_base_exceptions_multi_args() -> None: """Test the base exception class.""" e = ex.CleanRoomError('message', 'something') assert str(e) == 'Error: (\'message\', \'something\')'