Allow doctests to be defined dynamically
Split doctests that expect an exception from the ones who does not