# Path: clonedigger/logilab/common/compat.py
# class set(_baseset):
#     """mutable set"""
#     def add(self, value):
#         self._data[value] = 1
# 
#     def remove(self, element):
#         """removes <element> from set"""
#         del self._data[element]
# 
#     def pop(self):
#         """pops an arbitrary element from set"""
#         return self._data.popitem()[0]
# 
#     def __hash__(self):
#         """mutable et cannot be hashed."""
#         raise TypeError("set objects are not hashable")
# 
# def enumerate(iterable):
#     """emulates the python2.3 enumerate() function"""
#     i = 0
#     for val in iterable:
#         yield i, val
#         i += 1
#     #return zip(range(len(iterable)), iterable)
# 
# def any(iterable):
#     """any(iterable) -> bool
# 
#     Return True if bool(x) is True for any x in the iterable.
#     """
#     for elt in iterable:
#         if elt:
#             return True
#     return False
# 
# Path: clonedigger/logilab/common/modutils.py
# def load_module_from_name(dotted_name, path=None, use_sys=1):
#     """load a Python module from it's name
# 
#     :type dotted_name: str
#     :param dotted_name: python name of a module or package
# 
#     :type path: list or None
#     :param path:
#       optional list of path where the module or package should be
#       searched (use sys.path if nothing or None is given)
# 
#     :type use_sys: bool
#     :param use_sys:
#       boolean indicating whether the sys.modules dictionary should be
#       used or not
# 
# 
#     :raise ImportError: if the module or package is not found
#     
#     :rtype: module
#     :return: the loaded module
#     """
#     return load_module_from_modpath(dotted_name.split('.'), path, use_sys)


from future import standard_library
from builtins import zip
from builtins import str
from builtins import input
from builtins import map
from builtins import *
from builtins import object
from warnings import warn
from compiler.consts import CO_GENERATOR
    from test import test_support
from clonedigger.logilab.common.deprecation import class_renamed, deprecated_function, \
     obsolete
from clonedigger.logilab.common.compat import set, enumerate, any
from clonedigger.logilab.common.modutils import load_module_from_name
from clonedigger.logilab.common.debugger import Debugger
from clonedigger.logilab.common.decorators import cached
        from hotshot import Profile
        from hotshot import stats
from io import StringIO
                    from pprint import pprint
        from xml.sax import make_parser, SAXParseException
        from clonedigger.logilab.aspects.weaver import weaver
        from clonedigger.logilab.aspects.lib.contracts import ContractAspect
import sys
import os, os.path as osp
import re
import time
import getopt
import traceback
import unittest
import difflib
import types
    import readline
        import getopt
import doctest
            msgs.append('d2 is lacking %r' % d1)
        if msgs:
            self.fail('\n'.join(msgs))
    assertDictEqual = assertDictEquals

    def assertSetEquals(self, got, expected, msg=None):
        """compares two iterables and shows difference between both"""
        got, expected = list(got), list(expected)
        if msg is None:
	        msg1 = '%s != %s' % (got, expected)
        else:
            msg1 = msg
        self.assertEquals(len(got), len(expected), msg1)
        got, expected = set(got), set(expected)
        if got != expected:
            missing = expected - got
            unexpected = got - expected
            if msg is None:
                msg = '\tunexepected: %s\n\tmissing: %s' % (unexpected,
                                                               missing)
            self.fail(msg)
    assertSetEqual = assertSetEquals

    def assertListEquals(self, l1, l2, msg=None):
        """compares two lists

        If the two list differ, the first difference is shown in the error
        message
        """
        _l1 = l1[:]

# Path: clonedigger/logilab/common/compat.py
# class set(_baseset):
#     """mutable set"""
#     def add(self, value):
#         self._data[value] = 1
# 
#     def remove(self, element):
#         """removes <element> from set"""
#         del self._data[element]
# 
#     def pop(self):
#         """pops an arbitrary element from set"""
#         return self._data.popitem()[0]
# 
#     def __hash__(self):
#         """mutable et cannot be hashed."""
#         raise TypeError("set objects are not hashable")
# 
# def enumerate(iterable):
#     """emulates the python2.3 enumerate() function"""
#     i = 0
#     for val in iterable:
#         yield i, val
#         i += 1
#     #return zip(range(len(iterable)), iterable)
# 
# def any(iterable):
#     """any(iterable) -> bool
# 
#     Return True if bool(x) is True for any x in the iterable.
#     """
#     for elt in iterable:
#         if elt:
#             return True
#     return False
# 
# Path: clonedigger/logilab/common/modutils.py
# def load_module_from_name(dotted_name, path=None, use_sys=1):
#     """load a Python module from it's name
# 
#     :type dotted_name: str
#     :param dotted_name: python name of a module or package
# 
#     :type path: list or None
#     :param path:
#       optional list of path where the module or package should be
#       searched (use sys.path if nothing or None is given)
# 
#     :type use_sys: bool
#     :param use_sys:
#       boolean indicating whether the sys.modules dictionary should be
#       used or not
# 
# 
#     :raise ImportError: if the module or package is not found
#     
#     :rtype: module
#     :return: the loaded module
#     """
#     return load_module_from_modpath(dotted_name.split('.'), path, use_sys)


# Path: clonedigger/logilab/common/testlib.py
from future import standard_library
from builtins import zip
from builtins import str
from builtins import input
from builtins import map
from builtins import *
from builtins import object
from warnings import warn
from compiler.consts import CO_GENERATOR
    from test import test_support
from clonedigger.logilab.common.deprecation import class_renamed, deprecated_function, \
     obsolete
from clonedigger.logilab.common.compat import set, enumerate, any
from clonedigger.logilab.common.modutils import load_module_from_name
from clonedigger.logilab.common.debugger import Debugger
from clonedigger.logilab.common.decorators import cached
        from hotshot import Profile
        from hotshot import stats
from io import StringIO
                    from pprint import pprint
        from xml.sax import make_parser, SAXParseException
        from clonedigger.logilab.aspects.weaver import weaver
        from clonedigger.logilab.aspects.lib.contracts import ContractAspect
import sys
import os, os.path as osp
import re
import time
import getopt
import traceback
import unittest
import difflib
import types
    import readline
        import getopt
import doctest

            msgs.append('d2 is lacking %r' % d1)
        if msgs:
            self.fail('\n'.join(msgs))
    assertDictEqual = assertDictEquals

    def assertSetEquals(self, got, expected, msg=None):
        """compares two iterables and shows difference between both"""
        got, expected = list(got), list(expected)
        if msg is None:
	        msg1 = '%s != %s' % (got, expected)
        else:
            msg1 = msg
        self.assertEquals(len(got), len(expected), msg1)
        got, expected = set(got), set(expected)
        if got != expected:
            missing = expected - got
            unexpected = got - expected
            if msg is None:
                msg = '\tunexepected: %s\n\tmissing: %s' % (unexpected,
                                                               missing)
            self.fail(msg)
    assertSetEqual = assertSetEquals

    def assertListEquals(self, l1, l2, msg=None):
        """compares two lists

        If the two list differ, the first difference is shown in the error
        message
        """
        _l1 = l1[:]

        for i, value in enumerate(l2):