# Path: taipan/_compat.py
# IS_PY26 = sys.version_info[:2] == (2, 6)
# IS_PY3 = sys.version_info[0] == 3
# class MetaclassDecorator(object):
#     def __init__(self, meta):
#     def __call__(self, cls):
# 
# Path: taipan/testing/testcase.py
# class TestCase(_TestCase, AssertsMixin):
#     """Augmented test case class.
# 
#     Includes few additional, convenience assertion methods,
#     as well as the capability to use test stage decorators,
#     such as :func:`setUp` and :func:`tearDown`.
#     """
#     # Python 3 changes name of the following assert function,
#     # so we provide backward and forward synonyms for compatibility
#     if IS_PY3:
#         assertItemsEqual = _TestCase.assertCountEqual
#     else:
#         assertCountEqual = _TestCase.assertItemsEqual


from itertools import product
from taipan._compat import xrange
from taipan.testing import TestCase
import taipan.functional.combinators as __unit__
"""
Tests for .functional.combinators module.
"""




# General combinators

class _Combinator(TestCase):

    def _assertIntegerFunctionsEqual(self, f, g, argcount=1, domain=None):
        if domain is None:
            # use roughly the same amount time regardless of function's arity
            limit = int(pow(512, 1.0 / argcount))
            self.assertGreater(
                limit, 0, msg="Too many arguments for integer functions")

# Path: taipan/_compat.py
# IS_PY26 = sys.version_info[:2] == (2, 6)
# IS_PY3 = sys.version_info[0] == 3
# class MetaclassDecorator(object):
#     def __init__(self, meta):
#     def __call__(self, cls):
# 
# Path: taipan/testing/testcase.py
# class TestCase(_TestCase, AssertsMixin):
#     """Augmented test case class.
# 
#     Includes few additional, convenience assertion methods,
#     as well as the capability to use test stage decorators,
#     such as :func:`setUp` and :func:`tearDown`.
#     """
#     # Python 3 changes name of the following assert function,
#     # so we provide backward and forward synonyms for compatibility
#     if IS_PY3:
#         assertItemsEqual = _TestCase.assertCountEqual
#     else:
#         assertCountEqual = _TestCase.assertItemsEqual


# Path: tests/test_functional/test_combinators.py
from itertools import product
from taipan._compat import xrange
from taipan.testing import TestCase
import taipan.functional.combinators as __unit__

"""
Tests for .functional.combinators module.
"""




# General combinators

class _Combinator(TestCase):

    def _assertIntegerFunctionsEqual(self, f, g, argcount=1, domain=None):
        if domain is None:
            # use roughly the same amount time regardless of function's arity
            limit = int(pow(512, 1.0 / argcount))
            self.assertGreater(
                limit, 0, msg="Too many arguments for integer functions")

            domain = xrange(-limit, limit + 1)