I have a small outline that contains a Python project. It has @test
nodes.
When I open the outline in leo with tk GUI and execute "run-unit-
tests", everything works well.
I've tried to switch to the qt GUI. I have todo.py in @enabled-
plugins.
When I execute "run-unit-tests", I get the following traceback:

Traceback (most recent call last):

  File "/tmp/1/leo-editor/leo/core/leoGlobals.py", line 3020, in
doHook
    return f(tag,keywords)

  File "/tmp/1/leo-editor/leo/core/leoPlugins.py", line 298, in
doPlugins
    return doHandlersForTag(tag,keywords)

  File "/tmp/1/leo-editor/leo/core/leoPlugins.py", line 273, in
doHandlersForTag
    val = callTagHandler(bunch,tag,keywords)

  File "/tmp/1/leo-editor/leo/core/leoPlugins.py", line 252, in
callTagHandler
    result = handler(tag,keywords)

  File "/tmp/1/leo-editor/leo/plugins/todo.py", line 73, in onCreate
    todoController(c)

  File "/tmp/1/leo-editor/leo/plugins/todo.py", line 211, in __init__
    self.ui = cleoQtUI(self)

  File "/tmp/1/leo-editor/leo/plugins/todo.py", line 86, in __init__
    self.owner.c.frame.log.createTab('Task', widget = self)

TypeError: createTab() got an unexpected keyword argument 'widget'

This somehow breaks all the tests. I see the following tracebacks
below:
Traceback (most recent call last):
  File "/tmp/1/leo-editor/leo/core/leoTest.py", line 177, in runTest
    execfile(scriptFile,d)
  File "/tmp/1/leo-editor/leo/test/scriptFile.py", line 3, in <module>
    import permutations
ImportError: No module named permutations

permutations is my own module that is a part of the project.

I believe this is the effect of a reminiscence from the tk version
(cleo)
I have tried to modify todo.py and replace the offending line

self.owner.c.frame.log.createTab('Task', widget = self)

with just

self.owner.c.frame.log.createTab('Task')

This makes the original traceback disappear and all my tests pass. I'm
not sure this is the proper way to fix it and I'm not sure this is a
sufficient change, that's why I've posted all relevant details here.

Terry, could you please have a look at todo.py and see if you can
reproduce the issue? Just open any outline with @test nodes with leo
having qt GUI and todo.py enabled and try to execute "run-unit-tests".
If you fail to get the above traceback, I will try to provide a
trivial outline for testing purposes (I can't provide the original
outline that triggers the traceback because it contains code that is
not open-source).


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to