jbalogh/django-nose — Issue #51: missing 'score' attribute breaks nose's "-p" at verbosity level 2
Author: abeld
Created: 2012-01-20 09:13:42+00:00
State: open

Using nose 1.1.2 and django-nose 0.1.3, printing the list of plugins at verbosity level 2 throws the following exception:

$ ./manage.py test -p --verbosity 2
Plugin django setup
Traceback (most recent call last):
File "./manage-dev", line 11, in
execute_manager(settings)
File "/home/abeld/WORK/myproject/env/src/django/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/home/abeld/WORK/myproject/env/src/django/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/abeld/WORK/myproject/env/src/django/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/abeld/WORK/myproject/env/src/django/django/core/management/base.py", line 220, in execute
output = self.handle(*args, **options)
File "/home/abeld/WORK/myproject/env/local/lib/python2.7/site-packages/south/management/commands/test.py", line 8, in handle
super(Command, self).handle(*args, **kwargs)
File "/home/abeld/WORK/myproject/env/src/django/django/core/management/commands/test.py", line 37, in handle
failures = test_runner.run_tests(test_labels)
File "/home/abeld/WORK/myproject/env/local/lib/python2.7/site-packages/django_nose/runner.py", line 85, in run_tests
result = self.run_suite(nose_argv)
File "/home/abeld/WORK/myproject/env/local/lib/python2.7/site-packages/django_nose/runner.py", line 49, in run_suite
addplugins=plugins_to_add)
File "/home/abeld/WORK/myproject/env/local/lib/python2.7/site-packages/nose/core.py", line 118, in __init__
**extra_args)
File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__
self.parseArgs(argv)
File "/home/abeld/WORK/myproject/env/local/lib/python2.7/site-packages/nose/core.py", line 147, in parseArgs
self.showPlugins()
File "/home/abeld/WORK/myproject/env/local/lib/python2.7/site-packages/nose/core.py", line 219, in showPlugins
print " score: %s" % p.score
AttributeError: 'DjangoSetUpPlugin' object has no attribute 'score'

Based on http://readthedocs.org/docs/nose/en/latest/plugins/interface.html saying "must have the attributes enabled, name and score", I assume it is django-nose's fault for not having that attribute.