晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。   林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。   见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝)   既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。   南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。 sh-3ll

HOME


sh-3ll 1.0
DIR:/opt/hc_python/lib/python3.12/site-packages/nose/
Upload File :
Current File : //opt/hc_python/lib/python3.12/site-packages/nose/usage.txt
nose collects tests automatically from python source files,
directories and packages found in its working directory (which
defaults to the current working directory). Any python source file,
directory or package that matches the testMatch regular expression
(by default: `(?:^|[\b_\.-])[Tt]est)` will be collected as a test (or
source for collection of tests). In addition, all other packages
found in the working directory will be examined for python source files
or directories that match testMatch. Package discovery descends all
the way down the tree, so package.tests and package.sub.tests and
package.sub.sub2.tests will all be collected.

Within a test directory or package, any python source file matching
testMatch will be examined for test cases. Within a test module,
functions and classes whose names match testMatch and TestCase
subclasses with any name will be loaded and executed as tests. Tests
may use the assert keyword or raise AssertionErrors to indicate test
failure. TestCase subclasses may do the same or use the various
TestCase methods available.

**It is important to note that the default behavior of nose is to
not include tests from files which are executable.**  To include
tests from such files, remove their executable bit or use
the --exe flag (see 'Options' section below).

Selecting Tests
---------------

To specify which tests to run, pass test names on the command line:

  %prog only_test_this.py
  
Test names specified may be file or module names, and may optionally
indicate the test case to run by separating the module or file name
from the test case name with a colon. Filenames may be relative or
absolute. Examples:

  %prog test.module
  %prog another.test:TestCase.test_method
  %prog a.test:TestCase
  %prog /path/to/test/file.py:test_function
  
You may also change the working directory where nose looks for tests
by using the -w switch:

  %prog -w /path/to/tests

Note, however, that support for multiple -w arguments is now deprecated
and will be removed in a future release. As of nose 0.10, you can get
the same behavior by specifying the target directories *without*
the -w switch:

  %prog /path/to/tests /another/path/to/tests

Further customization of test selection and loading is possible
through the use of plugins.

Test result output is identical to that of unittest, except for
the additional features (error classes, and plugin-supplied
features such as output capture and assert introspection) detailed
in the options below.

Configuration
-------------

In addition to passing command-line options, you may also put
configuration options in your project's *setup.cfg* file, or a .noserc
or nose.cfg file in your home directory. In any of these standard
ini-style config files, you put your nosetests configuration in a
``[nosetests]`` section. Options are the same as on the command line,
with the -- prefix removed. For options that are simple switches, you
must supply a value:

  [nosetests]
  verbosity=3
  with-doctest=1

All configuration files that are found will be loaded and their
options combined. You can override the standard config file loading
with the ``-c`` option.

Using Plugins
-------------

There are numerous nose plugins available via easy_install and
elsewhere. To use a plugin, just install it. The plugin will add
command line options to nosetests. To verify that the plugin is installed,
run:

  nosetests --plugins

You can add -v or -vv to that command to show more information
about each plugin.

If you are running nose.main() or nose.run() from a script, you
can specify a list of plugins to use by passing a list of plugins
with the plugins keyword argument.

0.9 plugins
-----------

nose 1.0 can use SOME plugins that were written for nose 0.9. The
default plugin manager inserts a compatibility wrapper around 0.9
plugins that adapts the changed plugin api calls. However, plugins
that access nose internals are likely to fail, especially if they
attempt to access test case or test suite classes. For example,
plugins that try to determine if a test passed to startTest is an
individual test or a suite will fail, partly because suites are no
longer passed to startTest and partly because it's likely that the
plugin is trying to find out if the test is an instance of a class
that no longer exists.

0.10 and 0.11 plugins
---------------------

All plugins written for nose 0.10 and 0.11 should work with nose 1.0.