Repository navigation
Expand file tree
/
Copy pathmodule_nose.importer.html
More file actions
49 lines (44 loc) · 5.64 KB
/
Copy pathmodule_nose.importer.html
File metadata and controls
49 lines (44 loc) · 5.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<html>
<head>
<title>nose: nose.importer</title>
<link rel="stylesheet" href="site.css" type="text/css"></link>
</head>
<body>
<div id="menu">
<p>This document covers nose version <b>0.10.1</b></p>
<p>Last update: <b>Fri Jan 4 10:06:23 2008</b></p>
<h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="empty_plugin.html">Minimal plugin</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest, os.environ and sys.argv</a></li></ul>
<h2>Classes</h2><ul><li><a href="#Importer">Importer</a></li></ul><h2>Functions</h2><ul><li><a href="#add_path">add_path</a></li><li><a href="#remove_path">remove_path</a></li></ul><h2>Attributes</h2><ul><li><a href="#log">log</a></li></ul>
</div>
<div id="main">
<h1>nose: nose.importer</h1>
<p>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.</p>
<h2>Classes</h2>
<p>Highlighted methods are defined in this class.</p><a name="Importer"></a><div class="cls section"><span class="cls name">Importer</span> (object)<div class="cls doc"><p>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.</p>
<h3>Methods</h3><div class="method section"><span class="method name">__init__<span class="args">(self, config=None)</span></span><div class="method doc"></div></div><div class="method section"><span class="method name">importFromDir<span class="args">(self, dir, fqname)</span></span><div class="method doc"><p>Import a module <em>only</em> from path, ignoring sys.path and
reloading if the version in sys.modules is not the one we want.</p>
</div></div><div class="method section"><span class="method name">importFromPath<span class="args">(self, path, fqname)</span></span><div class="method doc"><p>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.</p>
</div></div><div class="method section"><span class="method name">sameModule<span class="args">(self, mod, filename)</span></span><div class="method doc"></div></div></div></div><h2>Functions</h2>
<a name="add_path"></a><div class="func section"><span class="func name">add_path<span class="args">(path, config=None)</span></span><div class="func doc"><p>Ensure that the path, or the root of the current package (if
path is in a package) is in sys.path.</p>
</div></div>
<a name="remove_path"></a><div class="func section"><span class="func name">remove_path<span class="args">(path)</span></span><div class="func doc"></div></div><h2>Attributes</h2>
<a name="log"></a><div class="attr section"><span class="attr name">log</span><pre class="attr value">Default value: <logging.Logger instance></pre><div class="attr doc"></div></div>
</div>
<script src="http://www.google-analytics.com/urchin.js"
type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-2236166-1";
urchinTracker();
</script>
</body>
</html>