# Path: mom/builtins.py
# def byte(number):
# def bytes_leading(raw_bytes, needle=_compat.ZERO_BYTE):
# def bytes_trailing(raw_bytes, needle=_compat.ZERO_BYTE):
# def bin(number, prefix="0b"):
# def hex(number, prefix="0x"):
# def is_sequence(obj):
# def is_unicode(obj):
# def is_bytes(obj):
# def is_bytes_or_unicode(obj):
# def is_integer(obj):
# def integer_byte_length(number):
# def integer_byte_size(number):
# def integer_bit_length(number):
# def integer_bit_size(number):
# def integer_bit_count(number):
# def is_even(num):
# def is_odd(num):
# def is_positive(num):
# def is_negative(num):
# 
# Path: mom/functional.py
#   def _ifilterfalse(predicate, iterable):
#     def _complement(item):
# def compose(function, *functions):
#   def _composition(a_func, b_func):
#     def _wrap(*args, **kwargs):
# def _compose(function, *functions):
#   def _composition(*args_tuple):
# def complement(predicate):
#   def _negate(*args, **kwargs):
# def reduce(transform, iterable, *args):
# def each(walker, iterable):
# def some(predicate, iterable):
# def _some1(predicate, iterable):
# def _some2(predicate, iterable):
# def every(predicate, iterable):
# def none(predicate, iterable):
# def find(predicate, iterable, start=0):
# def leading(predicate, iterable, start=0):
# def _leading(predicate, iterable, start=0):
# def trailing(predicate, iterable, start=-1):
# def tally(predicate, iterable):
# def select(predicate, iterable):
# def iselect(predicate, iterable):
# def reject(predicate, iterable):
# def ireject(predicate, iterable):
# def partition(predicate, iterable):
#   def _partitioner(memo, item):
# def partition_dict(predicate, dictionary):
#   def _pred(tup):
# def map_dict(transform, dictionary):
# def select_dict(predicate, dictionary):
#   def _pred(tup):
# def reject_dict(predicate, dictionary):
#   def _pred(tup):
# def invert_dict(dictionary):
# def pluck(dicts, key, *args, **kwargs):
# def ipluck(dicts, key, *args, **kwargs):
#     def _get_value_from_dict(dictionary):
# def contains(iterable, item):
# def _contains_fallback(iterable, item):
# def omits(iterable, item):
# def difference(iterable1, iterable2):
# def idifference(iterable1, iterable2):
# def without(iterable, *values):
# def head(iterable):
# def tail(iterable):
# def itail(iterable):
# def nth(iterable, index, default=None):
# def last(iterable):
# def occurrences(iterable):
# def peel(iterable, count=1):
# def ipeel(iterable, count=1):
# def ichunks(iterable, size, *args, **kwargs):
# def chunks(iterable, size, *args, **kwargs):
# def truthy(iterable):
# def itruthy(iterable):
# def falsy(iterable):
# def ifalsy(iterable):
# def flatten(iterable):
#   def _flatten(memo, item):
# def flatten1(iterable):
#   def _flatten(memo, item):
# def group_consecutive(predicate, iterable):
# def flock(predicate, iterable):
# def unique(iterable, is_sorted=False):
#     def _unique(memo, item):
# def union(iterable, *iterables):
# def intersection(iterable, *iterables):
#   def _does_other_contain(item):
# def take(iterable, amount):
# def eat(iterator, amount):
# def _get_iter_next(iterator):
# def round_robin(*iterables):
# def ncycles(iterable, times):
# def identity(arg):
# def loob(arg):
# def always(_):
# def never(_):
# def constant(c):
#   def _func(*args, **kwargs):
# def nothing(*args, **kwargs):


import unittest2
from mom import builtins
from mom import functional
    a = functional._compose(f)
    self.assertEqual(a(5), 5)


class Test_complement(unittest2.TestCase):
  def test_complementary_function(self):
    def tru(x):
      return True

    fals = functional.complement(tru)
    ahem = functional.complement(fals)
    self.assertFalse(fals(5))
    self.assertTrue(ahem(5))

# Contains and omits tests
class Test_contains(unittest2.TestCase):
  def test_contains_value(self):
    self.assertTrue(functional.contains(range(4), 3))
    self.assertFalse(functional.contains(range(4), 43))
    self.assertTrue(functional.contains({"a": 4, "b": 5}, "a"))
    self.assertFalse(functional.contains({"a": 4, "b": 5}, "c"))
    self.assertTrue(functional.contains(set([1, 2, 3]), 3))
    self.assertFalse(functional.contains(set([1, 2, 3]), 5))

  def test_TypeError_when_not_iterable(self):
    self.assertRaises(TypeError, functional.contains, None, 4)
    self.assertRaises(TypeError, functional.contains, True, 4)
    self.assertRaises(TypeError, functional.contains, 0, 4)

  def test_index_ValueError_branch(self):

# Path: mom/builtins.py
# def byte(number):
# def bytes_leading(raw_bytes, needle=_compat.ZERO_BYTE):
# def bytes_trailing(raw_bytes, needle=_compat.ZERO_BYTE):
# def bin(number, prefix="0b"):
# def hex(number, prefix="0x"):
# def is_sequence(obj):
# def is_unicode(obj):
# def is_bytes(obj):
# def is_bytes_or_unicode(obj):
# def is_integer(obj):
# def integer_byte_length(number):
# def integer_byte_size(number):
# def integer_bit_length(number):
# def integer_bit_size(number):
# def integer_bit_count(number):
# def is_even(num):
# def is_odd(num):
# def is_positive(num):
# def is_negative(num):
# 
# Path: mom/functional.py
#   def _ifilterfalse(predicate, iterable):
#     def _complement(item):
# def compose(function, *functions):
#   def _composition(a_func, b_func):
#     def _wrap(*args, **kwargs):
# def _compose(function, *functions):
#   def _composition(*args_tuple):
# def complement(predicate):
#   def _negate(*args, **kwargs):
# def reduce(transform, iterable, *args):
# def each(walker, iterable):
# def some(predicate, iterable):
# def _some1(predicate, iterable):
# def _some2(predicate, iterable):
# def every(predicate, iterable):
# def none(predicate, iterable):
# def find(predicate, iterable, start=0):
# def leading(predicate, iterable, start=0):
# def _leading(predicate, iterable, start=0):
# def trailing(predicate, iterable, start=-1):
# def tally(predicate, iterable):
# def select(predicate, iterable):
# def iselect(predicate, iterable):
# def reject(predicate, iterable):
# def ireject(predicate, iterable):
# def partition(predicate, iterable):
#   def _partitioner(memo, item):
# def partition_dict(predicate, dictionary):
#   def _pred(tup):
# def map_dict(transform, dictionary):
# def select_dict(predicate, dictionary):
#   def _pred(tup):
# def reject_dict(predicate, dictionary):
#   def _pred(tup):
# def invert_dict(dictionary):
# def pluck(dicts, key, *args, **kwargs):
# def ipluck(dicts, key, *args, **kwargs):
#     def _get_value_from_dict(dictionary):
# def contains(iterable, item):
# def _contains_fallback(iterable, item):
# def omits(iterable, item):
# def difference(iterable1, iterable2):
# def idifference(iterable1, iterable2):
# def without(iterable, *values):
# def head(iterable):
# def tail(iterable):
# def itail(iterable):
# def nth(iterable, index, default=None):
# def last(iterable):
# def occurrences(iterable):
# def peel(iterable, count=1):
# def ipeel(iterable, count=1):
# def ichunks(iterable, size, *args, **kwargs):
# def chunks(iterable, size, *args, **kwargs):
# def truthy(iterable):
# def itruthy(iterable):
# def falsy(iterable):
# def ifalsy(iterable):
# def flatten(iterable):
#   def _flatten(memo, item):
# def flatten1(iterable):
#   def _flatten(memo, item):
# def group_consecutive(predicate, iterable):
# def flock(predicate, iterable):
# def unique(iterable, is_sorted=False):
#     def _unique(memo, item):
# def union(iterable, *iterables):
# def intersection(iterable, *iterables):
#   def _does_other_contain(item):
# def take(iterable, amount):
# def eat(iterator, amount):
# def _get_iter_next(iterator):
# def round_robin(*iterables):
# def ncycles(iterable, times):
# def identity(arg):
# def loob(arg):
# def always(_):
# def never(_):
# def constant(c):
#   def _func(*args, **kwargs):
# def nothing(*args, **kwargs):


# Path: mom/tests/test_mom_functional.py
import unittest2
from mom import builtins
from mom import functional

    a = functional._compose(f)
    self.assertEqual(a(5), 5)


class Test_complement(unittest2.TestCase):
  def test_complementary_function(self):
    def tru(x):
      return True

    fals = functional.complement(tru)
    ahem = functional.complement(fals)
    self.assertFalse(fals(5))
    self.assertTrue(ahem(5))

# Contains and omits tests
class Test_contains(unittest2.TestCase):
  def test_contains_value(self):
    self.assertTrue(functional.contains(range(4), 3))
    self.assertFalse(functional.contains(range(4), 43))
    self.assertTrue(functional.contains({"a": 4, "b": 5}, "a"))
    self.assertFalse(functional.contains({"a": 4, "b": 5}, "c"))
    self.assertTrue(functional.contains(set([1, 2, 3]), 3))
    self.assertFalse(functional.contains(set([1, 2, 3]), 5))

  def test_TypeError_when_not_iterable(self):
    self.assertRaises(TypeError, functional.contains, None, 4)
    self.assertRaises(TypeError, functional.contains, True, 4)
    self.assertRaises(TypeError, functional.contains, 0, 4)

  def test_index_ValueError_branch(self):

    class MockContainer(object):