Changeset 124
- Timestamp:
- Sat Nov 18 21:11:58 2006
- Files:
-
- trunk/setup.py (modified) (diff)
- trunk/scripts/mkindex.py (modified) (diff)
- trunk/CHANGELOG (modified) (diff)
- trunk/setup.cfg (modified) (diff)
- trunk/nose/core.py (modified) (diff)
- trunk/nose/__init__.py (modified) (diff)
- trunk/nose/commands.py (added)
- trunk/index.html.tpl (modified) (diff)
- trunk/README.txt (modified) (diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
trunk/setup.py
r106 r124 45 45 'attrib = nose.plugins.attrib:AttributeSelector', 46 46 'missed = nose.plugins.missed:MissedTests' 47 ] 47 ], 48 'distutils.commands': [ 49 ' nosetests = nose.commands:nosetests' 50 ], 48 51 }, 49 52 test_suite = 'nose.collector', -
trunk/scripts/mkindex.py
r31 r124 3 3 from docutils.core import publish_string, publish_parts 4 4 import nose 5 import nose.commands 5 6 import nose.tools 6 7 import os … … 20 21 'date': time.ctime()}) 21 22 22 # print "Tools..." 23 # tools = publish_parts(nose.tools.__doc__, writer_name='html') 24 # docs['tools'] = tools['body'] 23 print "Tools..." 24 tools = publish_parts(nose.tools.__doc__, writer_name='html') 25 docs['tools'] = tools['body'] 26 27 print "Commands..." 28 cmds = publish_parts(nose.commands.__doc__, writer_name='html') 29 docs['commands'] = cmds['body'] 25 30 26 31 print "Changelog..." -
trunk/CHANGELOG
r111 r124 7 7 @deferred decorator that makes it simple to write deferred tests, with or 8 8 without timeouts. 9 - Added nosetests setuptools command. Now you can run python setup.py 10 nosetests and have access to all nose features and plugins. Thanks to James 11 Casbon for the patch. 9 12 10 13 0.9.1 -
trunk/setup.cfg
r22 r124 1 1 [egg_info] 2 2 tag_build = .dev 3 tag_svn_revision = 13 tag_svn_revision = 1 4 5 [nosetests] 6 verbosity=2 7 detailed-errors=1 8 with-coverage=1 9 cover-package=nose 10 pdb=1 11 pdb-failures=1 12 stop=1 -
trunk/nose/core.py
r121 r124 232 232 self.success = result.wasSuccessful() 233 233 return self.success 234 235 def configure(argv=None, env=None, help=False, disable_plugins=None): 236 """Configure the nose running environment. Execute configure before 237 collecting tests with nose.TestCollector to enable output capture and 238 other features. 239 """ 240 if argv is None: 241 argv = sys.argv 242 if env is None: 243 env = os.environ 244 245 conf = Config() 234 235 def get_parser(env=None): 246 236 parser = OptionParser(TestProgram.__doc__) 247 237 parser.add_option("-V","--version",action="store_true", 248 238 dest="version",default=False, 249 239 help="Output nose version and exit") 250 parser.add_option("-v", "--verbose", action="count", 251 dest="verbosity", 240 parser.add_option("-v", "--verbose", 241 action="count", dest="verbosity", 252 242 default=int(env.get('NOSE_VERBOSE', 1)), 253 243 help="Be more verbose. [NOSE_VERBOSE]") 244 parser.add_option("--verbosity", action="store", dest="verbosity", 245 type="int", help="Set verbosity; --verbosity=2 is " 246 "the same as -vv") 254 247 parser.add_option("-l", "--debug", action="store", 255 248 dest="debug", default=env.get('NOSE_DEBUG'), … … 312 305 all_plugins = [] 313 306 # when generating the help message, load only builtin plugins 314 for plugcls in load_plugins( others=not help):307 for plugcls in load_plugins(): 314 307 plug = plugcls() 315 308 try: … … 318 311 except AttributeError: 319 312 pass 320 all_plugins.append(plug) 313 314 return parser 315 316 def configure(argv=None, env=None, help=False, disable_plugins=None): 317 """Configure the nose running environment. Execute configure before 318 collecting tests with nose.TestCollector to enable output capture and 319 other features. 320 """ 321 if argv is None: 322 argv = sys.argv 323 if env is None: 324 env = os.environ 325 326 conf = Config() 327 parser = get_parser(env=env) 321 328 322 329 options, args = parser.parse_args(argv) … … 347 354 348 355 configure_logging(options) 349 356 349 356 # hand options to plugins 357 all_plugins = [plug() for plug in load_plugins()] 350 358 for plug in all_plugins: 351 359 plug.configure(options, conf) … … 357 365 log.warning("Plugin %s disabled: not all methods " 358 366 "supported in this environment" % plug.name) 359 360 361 367 conf.addPaths = options.addPaths 362 368 conf.capture = options.capture -
trunk/nose/__init__.py
r110 r124 96 96 plugins. 97 97 98 nose 1.0 will include a custom setuptools command that will enable all 99 plugins. 98 nose also includes its own setuptools command, `nosetests`, that provides 99 support for all plugins and command line options, as well as configuration 100 using the setup.cfg file. See nose.commands_ for more information about the 101 `nosetests` command. 100 102 101 103 .. _setuptools: http://peak.telecommunity.com/DevCenter/setuptools 104 .. _nose.commands: #commands 102 105 103 106 Writing tests -
trunk/index.html.tpl
r108 r124 205 205 %(body)s 206 206 207 <h2><a name="tools"></a>nose.tools</h2> 208 209 %(tools)s 210 211 <p><b>FIXME:</b> use pudge to generate rst docs for all tools funcs</p> 212 213 <h2><a name="commands"></a>nosetests setuptools command</h2> 214 215 %(commands)s 216 207 217 <h2><a name="usage"></a>nosetests usage</h2> 208 218 -
trunk/README.txt
r104 r124 96 96 plugins. 97 97 98 nose 1.0 will include a custom setuptools command that will enable all 99 plugins. 98 nose also includes its own setuptools command, `nosetests`, that provides 99 support for all plugins and command line options, as well as configuration 100 using the setup.cfg file. See nose.commands_ for more information about the 101 `nosetests` command. 100 102 101 103 .. _setuptools: http://peak.telecommunity.com/DevCenter/setuptools 104 .. _nose.commands: #commands 102 105 103 106 Writing tests
