# Importer

Implements an importer that looks only in specific path (ignoring sys.path), and uses a per-path cache in addition to sys.modules. This is necessary because test modules in different directories frequently have the same names, which means that the first loaded would mask the rest when using the builtin importer.

class `nose.importer.``Importer`(config=None)

  An importer class that does only path-specific imports. That is, the given module is not searched for on sys.path, but only at the path or in the directory specified.

  `importFromDir`(dir, fqname)

    Import a module only from path, ignoring sys.path and reloading if the version in sys.modules is not the one we want.

  `importFromPath`(path, fqname)

    Import a dotted-name package whose tail is at path. In other words, given foo.bar and path/to/foo/bar.py, import foo from path/to/foo then bar from path/to/foo/bar, returning bar.

`nose.importer.``add_path`(path, config=None)

  Ensure that the path, or the root of the current package (if path is in a package), is in sys.path.