[issue7501] python -m unittest path_to_suite_function errors

2010-08-22 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Well, it was misdiagnosed yes - but asking for python -m unittest ... support in Python 2.6 is still a feature request and not a bug report. (So unfortunately it can't be fixed in 2.6 which is bugfix only. The solution is to use

[issue7501] python -m unittest path_to_suite_function errors

2010-08-20 Thread James Westby
James Westby jw+deb...@jameswestby.net added the comment: Hi, I think this was misdiagnosed: from unittest.py in 2.6, loadTestFromName: elif hasattr(obj, '__call__'): test = obj() if isinstance(test, TestSuite): return test elif

[issue7501] python -m unittest path_to_suite_function errors

2010-02-10 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Use load_tests instead. -- resolution: - rejected stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7501

[issue7501] python -m unittest path_to_suite_function errors

2010-02-07 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Is this needed as well as the load_tests protocol? If a test module defines a load_tests function that returns a test suite then the following creates the test suite from load_tests and executes that: python -m unittest modulename

[issue7501] python -m unittest path_to_suite_function errors

2010-02-05 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: What made you think that would work? In your example foo.test_suite is neither a test nor a suite but a function. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7501

[issue7501] python -m unittest path_to_suite_function errors

2010-02-05 Thread Robert Collins
Robert Collins robe...@robertcollins.net added the comment: Its a common convention in zope.testing, trial, testtools, bzr, ... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7501 ___

[issue7501] python -m unittest path_to_suite_function errors

2010-02-05 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: So it's a feature request then... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7501 ___

[issue7501] python -m unittest path_to_suite_function errors

2010-02-05 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com added the comment: Sounds like one. As far as the trial behavior goes, trial foo.test_suite won't work, but trial foo will call foo.test_suite, if one is defined. -- nosy: +exarkun ___ Python tracker

[issue7501] python -m unittest path_to_suite_function errors

2009-12-13 Thread Robert Collins
New submission from Robert Collins robe...@robertcollins.net: :!python -m unittest foo.test_suite Traceback (most recent call last): File /usr/lib/python2.6/runpy.py, line 122, in _run_module_as_main __main__, fname, loader, pkg_name) File /usr/lib/python2.6/runpy.py, line 34, in

[issue7501] python -m unittest path_to_suite_function errors

2009-12-13 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +michael.foord priority: - normal type: crash - behavior versions: -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7501