﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
9031	Small bug if typo in testcase	Thomas Güttler	nobody	"If there is a typo in a testcase, you get an exception:

{{{
user@host:~/myproj> ./manage.py test myapp.hereisatypo.testSomething
Traceback (most recent call last):
  File ""./manage.py"", line 11, in <module>
    execute_manager(etc.settings)
  File ""/localhome/modw/django/core/management/__init__.py"", line 340, in execute_manager
    utility.execute()
  File ""/localhome/modw/django/core/management/__init__.py"", line 295, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File ""/localhome/modw/django/core/management/base.py"", line 77, in run_from_argv
    self.execute(*args, **options.__dict__)
  File ""/localhome/modw/django/core/management/base.py"", line 96, in execute
    output = self.handle(*args, **options)
  File ""/localhome/modw/django/core/management/commands/test.py"", line 33, in handle
    failures = test_runner(test_labels, verbosity=verbosity, interactive=interactive)
  File ""/localhome/modw/django/test/simple.py"", line 129, in run_tests
    suite.addTest(build_test(label))
  File ""/localhome/modw/django/test/simple.py"", line 100, in build_test
    return TestClass(parts[2])
TypeError: 'NoneType' object is not callable
}}}

The small patch results in a better error message:
{{{
user@host:~/myproj> ./manage.py test myapp.hereisatypo.testSomething
Traceback (most recent call last):
  File ""./manage.py"", line 11, in <module>
    execute_manager(etc.settings)
  File ""/localhome/modw/django/core/management/__init__.py"", line 340, in execute_manager
    utility.execute()
  File ""/localhome/modw/django/core/management/__init__.py"", line 295, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File ""/localhome/modw/django/core/management/base.py"", line 77, in run_from_argv
    self.execute(*args, **options.__dict__)
  File ""/localhome/modw/django/core/management/base.py"", line 96, in execute
    output = self.handle(*args, **options)
  File ""/localhome/modw/django/core/management/commands/test.py"", line 33, in handle
    failures = test_runner(test_labels, verbosity=verbosity, interactive=interactive)
  File ""/localhome/modw/django/test/simple.py"", line 132, in run_tests
    suite.addTest(build_test(label))
  File ""/localhome/modw/django/test/simple.py"", line 102, in build_test
    parts[1], parts[0], parts[0]))
ValueError: TestCase hereisatypo not found. Searched in myapp.models and myapp.tests
}}}"	Uncategorized	closed	Testing framework	1.0	Normal	fixed			Ready for checkin	1	0	0	0	0	0
