[issue15392] Create a unittest framework for IDLE
R. David Murray
report at bugs.python.org
Tue May 21 19:57:27 CEST 2013
R. David Murray added the comment:
regrtest now works for me, as does running test_idle.py directly and the simple minded unittest call:
./python -m unittest test.test_idle
However, running an individual test doesn't. I don't see this as a show-stopper for committing this, but rather something we should figure out how to fix later.
rdmurray at hey:~/python/p34>./python -m unittest test.test_idle
...
----------------------------------------------------------------------
Ran 3 tests in 0.003s
OK
rdmurray at hey:~/python/p34>./python -m unittest -v test.test_idle
test_bad_entity (idlelib.idle_test.test_calltips.Test_get_entity) ... ok
test_good_entity (idlelib.idle_test.test_calltips.Test_get_entity) ... ok
test_DirBrowserTreeItem (idlelib.idle_test.test_pathbrowser.PathBrowserTest) ... ok
----------------------------------------------------------------------
Ran 3 tests in 0.004s
OK
rdmurray at hey:~/python/p34>./python -m unittest -v test.test_idle.idlelib.idle_test.test_calltips.Test_get_entity.test_bad_entity
Traceback (most recent call last):
File "/home/rdmurray/python/p34/Lib/runpy.py", line 160, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/home/rdmurray/python/p34/Lib/runpy.py", line 73, in _run_code
exec(code, run_globals)
File "/home/rdmurray/python/p34/Lib/unittest/__main__.py", line 19, in <module>
main(module=None)
File "/home/rdmurray/python/p34/Lib/unittest/main.py", line 124, in __init__
self.parseArgs(argv)
File "/home/rdmurray/python/p34/Lib/unittest/main.py", line 171, in parseArgs
self.createTests()
File "/home/rdmurray/python/p34/Lib/unittest/main.py", line 178, in createTests
self.module)
File "/home/rdmurray/python/p34/Lib/unittest/loader.py", line 145, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "/home/rdmurray/python/p34/Lib/unittest/loader.py", line 145, in <listcomp>
suites = [self.loadTestsFromName(name, module) for name in names]
File "/home/rdmurray/python/p34/Lib/unittest/loader.py", line 113, in loadTestsFromName
parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'idlelib'
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15392>
_______________________________________
More information about the Python-bugs-list
mailing list