Does it make sense to assert on the rulecode as well as the str and repr?