'When constructed with a state that isn\'t allowed,
`InvariantException` is raised.
:param state: A state which isn\'t a valid state for
``AlgebraicType``.'

@given(state=st.sampled_from((pset(States.iterconstants()) - AlgebraicType.__invariant__._allowed_tags)), extra_value=st.booleans())
@example(state=States.DISALLOWED, extra_value=False)
def test_invalid_states(self, state, extra_value):

    args = {'state': state, 'extra': extra_value}
    exc = self.assertRaises(InvariantException, AlgebraicType, **args)
    self.assertIn('can    only    be    in    states', exc.invariant_errors[0])
