def test_misc_exceptions(): raised = False try: SubsetIterator.__new__(SubsetIterator).next() except NotImplementedError: raised = True assert raised raised = False try: SubsetIterator(1, 2, 3) except NotImplementedError: raised = True assert raised raised = False try: SequentialSubsetIterator(10, 3, 3, rng=0) except ValueError: raised = True assert raised