"""Base exception classes and common exceptions for randomness tests."""
__all__ = [
"TestError",
"TestNotImplementedError",
"TestInputError",
"NonBinarySequenceError",
]
[docs]class TestError(Exception):
"""Base class for test-related errors"""
[docs]class TestNotImplementedError(TestError, NotImplementedError):
"""Error if test is not implemented to handle valid parameters"""
[docs]class NonBinarySequenceError(TestInputError):
"""Error if sequence does not contain only 2 distinct values"""
def __str__(self):
return "Sequence does not contain only 2 distinct values (i.e. binary)"