assert exceptions in str examples