nose-devs/nose — Issue #158: `python setup.py nosetests` raise IndexError when no options are set
Author: jpellerin
Created: 2011-12-14 16:02:11+00:00
State: closed

Nose V 0.10.0.

The command `python setup.py nosetests` raises the IndexError exception :

Traceback (most recent call last):
File "setup.py", line 45, in
"""
File "/opt/stackless/lib/python2.5/distutils/core.py", line 151, in setup
dist.run_commands()
File "/opt/stackless/lib/python2.5/distutils/dist.py", line 974, in
run_commands
self.run_command(cmd)
File "/opt/stackless/lib/python2.5/distutils/dist.py", line 994, in
run_command
cmd_obj.run()
File
"/home/apr/projects/fw-ng/dev/lib/python2.5/site-packages/nose-0.10.0-py2.5.egg/nose/commands.py",
line 115, in run
TestProgram(argv=argv, config=self.__config)
File
"/home/apr/projects/fw-ng/dev/lib/python2.5/site-packages/nose-0.10.0-py2.5.egg/nose/core.py",
line 219, in __init__
argv=argv, testRunner=testRunner, testLoader=testLoader)
File "/opt/stackless/lib/python2.5/unittest.py", line 766, in __init__
self.progName = os.path.basename(argv[0])
IndexError: list index out of range

Even when no options is used, the `argv` list must not be empty but must
begin by the program name.

Google Code Info:
Issue #: 126
Author: alain.po...@gmail.com
Created On: 2007-10-24T18:08:35.000Z
Closed On: 2007-10-30T19:29:29.000Z