Wasn't aware of assert_throws, it looks neat! I'll update my patch (will address other comments as well...)