trial object_path_to_suite_creator fails

[email protected] Sun, 13 Dec 2009 22:14:48 -0000
Newsgroups gmane.comp.python.twisted.bugs
Message-ID <[email protected]>
New submission from robertc <[email protected]>:

e.g.

trial foo.test_suite
  File "/usr/bin/trial", line 24, in <module>
    run()
  File "/usr/lib/python2.6/dist-packages/twisted/scripts/trial.py", line 357, in run
    suite = _getSuite(config)
  File "/usr/lib/python2.6/dist-packages/twisted/scripts/trial.py", line 315, in _getSuite
    return loader.loadByNames(config['tests'], recurse)
  File "/usr/lib/python2.6/dist-packages/twisted/trial/runner.py", line 647, in loadByNames
    for thing in set(things)]
  File "/usr/lib/python2.6/dist-packages/twisted/trial/runner.py", line 612, in loadAnything
    raise TypeError("No loader for %r. Unrecognized type" % (thing,))
TypeError: No loader for <function test_suite at 0x174bc80>. Unrecognized type


where:
def test_suite():
    loader = unittest.TestLoader()
    tests = loader.loadTestsFromName(__name__)
    result = loader.suiteClass()
    result.addTests(generate_scenarios(tests))
    return result

or similar

----------
Type     : enhancement
Component: core
Keywords : 
Priority : normal
Nosy     : 
----------
http://twistedmatrix.com/trac/ticket/4168