def reset ():
    """ Clear the module state. This is mainly for testing purposes.
        Note that this must be called _after_ resetting the module 'feature'.
    """
    global __prefixes_suffixes, __suffixes_to_types, __types, __rule_names_to_types, __target_suffixes_cache

    __register_features ()

    # Stores suffixes for generated targets.
    __prefixes_suffixes = [property.PropertyMap(), property.PropertyMap()]

    # Maps suffixes to types
    __suffixes_to_types = {}

    # A map with all the registered types, indexed by the type name
    # Each entry is a dictionary with following values:
    # 'base': the name of base type or None if type has no base
    # 'derived': a list of names of type which derive from this one
    # 'scanner': the scanner class registered for this type, if any
    __types = {}

    # Caches suffixes for targets with certain properties.
    __target_suffixes_cache = {}