This file is indexed.

/usr/share/doc/python-nose2/html/differences.html is in python-nose2-doc 0.7.4-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>Differences: nose2 vs nose vs unittest2 &mdash; nose2 0.6.0 documentation</title>
  

  
  
  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  

  

  
        <link rel="index" title="Index"
              href="genindex.html"/>
        <link rel="search" title="Search" href="search.html"/>
    <link rel="top" title="nose2 0.6.0 documentation" href="index.html"/>
        <link rel="next" title="Plugins for nose2" href="plugins.html"/>
        <link rel="prev" title="Configuring nose2" href="configuration.html"/> 

  
  <script src="_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

   
  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search">
          

          
            <a href="index.html" class="icon icon-home"> nose2
          

          
          </a>

          
            
            
              <div class="version">
                0.6
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting started with nose2</a></li>
<li class="toctree-l1"><a class="reference internal" href="usage.html">Using nose2</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuring nose2</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Differences: nose2 vs nose vs unittest2</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#nose2-is-not-nose">nose2 is not nose</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#what-s-different">What’s Different</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#python-versions">Python Versions</a></li>
<li class="toctree-l4"><a class="reference internal" href="#test-discovery-and-loading">Test Discovery and Loading</a></li>
<li class="toctree-l4"><a class="reference internal" href="#test-fixtures">Test Fixtures</a></li>
<li class="toctree-l4"><a class="reference internal" href="#parameterized-and-generator-tests">Parameterized and Generator Tests</a></li>
<li class="toctree-l4"><a class="reference internal" href="#configuration">Configuration</a></li>
<li class="toctree-l4"><a class="reference internal" href="#plugin-loading">Plugin Loading</a></li>
<li class="toctree-l4"><a class="reference internal" href="#limited-support-for-python-setup-py-test">Limited support for <code class="docutils literal"><span class="pre">python</span> <span class="pre">setup.py</span> <span class="pre">test</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#new-plugin-api">New Plugin API</a></li>
<li class="toctree-l4"><a class="reference internal" href="#missing-plugins">Missing Plugins</a></li>
<li class="toctree-l4"><a class="reference internal" href="#internals">Internals</a></li>
<li class="toctree-l4"><a class="reference internal" href="#license">License</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#what-s-the-same">What’s the Same</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#philosophy">Philosophy</a></li>
<li class="toctree-l4"><a class="reference internal" href="#people">People</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#nose2-is-not-exactly-unittest2-plugins">nose2 is not (exactly) unittest2/plugins</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="plugins.html">Plugins for nose2</a></li>
<li class="toctree-l1"><a class="reference internal" href="tools.html">Tools and Helpers</a></li>
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Changelog</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="dev/writing_plugins.html">Writing Plugins</a></li>
<li class="toctree-l1"><a class="reference internal" href="dev/documenting_plugins.html">Documenting plugins</a></li>
<li class="toctree-l1"><a class="reference internal" href="dev/event_reference.html">Event reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="dev/hook_reference.html">Hook reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="dev/session_reference.html">Session reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="dev/plugin_class_reference.html">Plugin class reference</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="dev/contributing.html">Contributing to nose2</a></li>
<li class="toctree-l1"><a class="reference internal" href="dev/internals.html">Internals</a></li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">nose2</a>
        
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="index.html">Docs</a> &raquo;</li>
        
      <li>Differences: nose2 vs nose vs unittest2</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/differences.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="differences-nose2-vs-nose-vs-unittest2">
<h1>Differences: nose2 vs nose vs unittest2<a class="headerlink" href="#differences-nose2-vs-nose-vs-unittest2" title="Permalink to this headline"></a></h1>
<div class="section" id="nose2-is-not-nose">
<h2>nose2 is not nose<a class="headerlink" href="#nose2-is-not-nose" title="Permalink to this headline"></a></h2>
<div class="section" id="what-s-different">
<h3>What’s Different<a class="headerlink" href="#what-s-different" title="Permalink to this headline"></a></h3>
<div class="section" id="python-versions">
<h4>Python Versions<a class="headerlink" href="#python-versions" title="Permalink to this headline"></a></h4>
<p>nose supports Python 2.4 and above, but nose2 <em>only supports Python
2.7, 3.3, 3.4, 3.5 and pypy</em>. Unfortunately, supporting Pythons
older than 2.7 along with Python 3 in the same codebase is not practical.
Since that is one of the core goals of nose2, support for older versions of
Python had to be sacrificed.</p>
</div>
<div class="section" id="test-discovery-and-loading">
<h4>Test Discovery and Loading<a class="headerlink" href="#test-discovery-and-loading" title="Permalink to this headline"></a></h4>
<p>nose loads test modules lazily: tests in the first-loaded module are
executed before the second module is imported. <em>nose2 loads all tests
first, then begins test execution</em>. This has some important
implications.</p>
<p>First, it means that nose2 does not need a custom importer. nose2
imports test modules with <code class="xref py py-func docutils literal"><span class="pre">__import__()</span></code>.</p>
<p>Second, it means that <em>nose2 does not support all of the test project
layouts that nose does</em>. Specifically, projects that look like this
will fail to load tests correctly with nose2:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>.
`-- tests
    |-- more_tests
    |   `-- test.py
    `-- test.py
</pre></div>
</div>
<p>To nose’s loader, those two test modules look like different
modules. But to nose2’s loader, they look the same, and will not load
correctly.</p>
</div>
<div class="section" id="test-fixtures">
<h4>Test Fixtures<a class="headerlink" href="#test-fixtures" title="Permalink to this headline"></a></h4>
<p>nose2 supports only the <em>same levels of fixtures as unittest2</em>. This
means class level fixtures and module level fixtures are supported,
but <em>package-level fixtures are not</em>. In addition, unlike nose, nose2
does not attempt to order tests named on the command-line to group
those with the same fixtures together.</p>
</div>
<div class="section" id="parameterized-and-generator-tests">
<h4>Parameterized and Generator Tests<a class="headerlink" href="#parameterized-and-generator-tests" title="Permalink to this headline"></a></h4>
<p>nose2 supports <em>more kinds of parameterized and generator tests than
nose</em>, and supports all test generators in test functions, test
classes, and in unittest TestCase subclasses. nose supports them only
in test functions and test classes that do not subclass
unittest.TestCase. See: <a class="reference internal" href="plugins/generators.html"><span class="doc">Loader: Test Generators</span></a> and
<a class="reference internal" href="plugins/parameters.html"><span class="doc">Loader: Parameterized Tests</span></a> for more.</p>
</div>
<div class="section" id="configuration">
<h4>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline"></a></h4>
<p>nose expects plugins to make all of their configuration parameters
available as command-line options. <em>nose2 expects almost all
configuration to be done via configuration files</em>. Plugins should
generally have only one command-line option: the option to activate
the plugin. Other configuration parameters should be loaded from
config files. This allows more repeatable test runs and keeps the set
of command-line options small enough for humans to read. See:
<a class="reference internal" href="configuration.html"><span class="doc">Configuring nose2</span></a> for more.</p>
</div>
<div class="section" id="plugin-loading">
<h4>Plugin Loading<a class="headerlink" href="#plugin-loading" title="Permalink to this headline"></a></h4>
<p>nose uses setuptools entry points to find and load plugins. nose2
does not. Instead, <em>nose2 requires that all plugins be listed in config
files</em>. This ensures that no plugin is loaded into a test system just
by virtue of being installed somewhere, and makes it easier to include
plugins that are part of the project under test. See:
<a class="reference internal" href="configuration.html"><span class="doc">Configuring nose2</span></a> for more.</p>
</div>
<div class="section" id="limited-support-for-python-setup-py-test">
<h4>Limited support for <code class="docutils literal"><span class="pre">python</span> <span class="pre">setup.py</span> <span class="pre">test</span></code><a class="headerlink" href="#limited-support-for-python-setup-py-test" title="Permalink to this headline"></a></h4>
<p>nose2 supports setuptools’ <code class="docutils literal"><span class="pre">python</span> <span class="pre">setup.py</span> <span class="pre">test</span></code> command, but via very
different means than nose. To avoid the internal complexity forced on
nose by the fact that the setuptools test command can’t be configured
with a custom test runner, when run this way, <em>nose2 essentially
hijacks the test running process</em>. The “test suite” that
<code class="xref py py-func docutils literal"><span class="pre">nose2.collector.collector()</span></code> returns actually <em>is</em> a test runner,
cloaked inside of a test case. It loads and runs tests as normal,
setting up its own test runner and test result, and calls <code class="docutils literal"><span class="pre">sys.exit()</span></code>
itself – completely bypassing the test runner and test result that
setuptools/unittest create. This may be incompatible with some
projects.</p>
</div>
<div class="section" id="new-plugin-api">
<h4>New Plugin API<a class="headerlink" href="#new-plugin-api" title="Permalink to this headline"></a></h4>
<p>nose2 implements a new plugin API based on the work done by Michael
Foord in unittest2’s <code class="docutils literal"><span class="pre">plugins</span></code> branch. This API is greatly superior to
the one in nose, especially in how it allows plugins to interact with
each other. But it is different enough from the API in nose that
supporting nose plugins in nose2 will not be practical: <em>plugins must
be rewritten to work with nose2</em>. See: <a class="reference internal" href="dev/writing_plugins.html"><span class="doc">Writing Plugins</span></a> for more.</p>
</div>
<div class="section" id="missing-plugins">
<h4>Missing Plugins<a class="headerlink" href="#missing-plugins" title="Permalink to this headline"></a></h4>
<p><em>nose2 does not (yet) include some of the more commonly-used plugins
in nose</em>. Most of these should arrive in future releases. However,
some of nose’s builtin plugins cannot be ported to nose2 due to
differences in internals. See: <a class="reference internal" href="plugins.html"><span class="doc">Plugins for nose2</span></a> for information on the
plugins built in to nose2.</p>
</div>
<div class="section" id="internals">
<h4>Internals<a class="headerlink" href="#internals" title="Permalink to this headline"></a></h4>
<p>nose wraps or replaces everything in unittest. nose2 does a bit less:
<em>it does not wrap TestCases</em>, and does not wrap the test result class
with a result proxy. nose2 does subclass <code class="xref py py-class docutils literal"><span class="pre">TestProgram</span></code>, and install its
own loader, runner, and result classes. It does this unconditionally,
rather than allowing arguments to <code class="docutils literal"><span class="pre">TestProgram.__init__()</span></code> to specify
the test loader and runner. See <a class="reference internal" href="dev/internals.html"><span class="doc">Internals</span></a> for more
information.</p>
</div>
<div class="section" id="license">
<h4>License<a class="headerlink" href="#license" title="Permalink to this headline"></a></h4>
<p>While nose was LGPL, nose2 is BSD licensed. This change was made at
the request of the majority of nose contributors.</p>
</div>
</div>
<div class="section" id="what-s-the-same">
<h3>What’s the Same<a class="headerlink" href="#what-s-the-same" title="Permalink to this headline"></a></h3>
<div class="section" id="philosophy">
<h4>Philosophy<a class="headerlink" href="#philosophy" title="Permalink to this headline"></a></h4>
<p>nose2 has the same goals as nose: to extend unittest to make testing
nicer and easier to understand. It aims to give developers
flexibility, power and transparency, so that common test scenarios
require no extra work, and uncommon test scenarios can be supported
with minimal fuss and magic.</p>
</div>
<div class="section" id="people">
<h4>People<a class="headerlink" href="#people" title="Permalink to this headline"></a></h4>
<p>nose2 is being developed by the same people who maintain nose.</p>
</div>
</div>
</div>
<div class="section" id="nose2-is-not-exactly-unittest2-plugins">
<h2>nose2 is not (exactly) unittest2/plugins<a class="headerlink" href="#nose2-is-not-exactly-unittest2-plugins" title="Permalink to this headline"></a></h2>
<p>nose2 is based on the unittest2 <code class="docutils literal"><span class="pre">plugins</span></code> branch, but differs from it in
several substantial ways. The <em>event api not exactly the same</em> because
nose2 can’t replace unittest.TestCase, and <em>does not configure the test
run or plugin set globally</em>. nose2 also has a <em>wholly different
reporting API</em> from unittest2’s plugins, one which we feel better
supports some common cases (like adding extra information to error
output). nose2 also <em>defers more work to plugins</em> than unittest2: the
test loader, runner and result are just plugin callers, and all of the
logic of test discovery, running and reporting is implemented in
plugins. This means that unlike unittest2, <em>nose2 includes a
substantial set of plugins that are active by default</em>.</p>
</div>
</div>


           </div>
           <div class="articleComments">
            
           </div>
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="plugins.html" class="btn btn-neutral float-right" title="Plugins for nose2" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="configuration.html" class="btn btn-neutral" title="Configuring nose2" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2018, Jason Pellerin.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'./',
            VERSION:'0.6.0',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true,
            SOURCELINK_SUFFIX: '.txt'
        };
    </script>
      <script type="text/javascript" src="_static/jquery.js"></script>
      <script type="text/javascript" src="_static/underscore.js"></script>
      <script type="text/javascript" src="_static/doctools.js"></script>

  

  
  
    <script type="text/javascript" src="_static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   

</body>
</html>