test test_editor_area_pane.py hints wx pyface backend doesn't implement EditorAreaPane #40

Open
idella opened this Issue Aug 31, 2012 · 8 comments

Projects

None yet

2 participants

@idella
idella commented Aug 31, 2012

version: 4.1.0

PYTHONPATH=build-2.7/lib nosetests --verbosity=1
Xlib: extension "RANDR" missing on display ":10".

...EE..................

ERROR: Does creating an editor work?


Traceback (most recent call last):
File "/mnt/gen2/TmpDir/portage/dev-python/pyface-4.1.0/work/pyface-4.1.0/pyface/tasks/tests/test_editor_area_pane.py", line 13, in test_create_editor
area = EditorAreaPane()
File "/mnt/gen2/TmpDir/portage/dev-python/pyface-4.1.0/work/pyface-4.1.0/pyface/toolkit.py", line 92, in init
raise NotImplementedError("the %s pyface backend doesn't implement %s" % (ETSConfig.toolkit, oname))
NotImplementedError: the wx pyface backend doesn't implement EditorAreaPane

ERROR: Does registering and unregistering factories work?


Traceback (most recent call last):
File "/mnt/gen2/TmpDir/portage/dev-python/pyface-4.1.0/work/pyface-4.1.0/pyface/tasks/tests/test_editor_area_pane.py", line 20, in test_factories
area = EditorAreaPane()
File "/mnt/gen2/TmpDir/portage/dev-python/pyface-4.1.0/work/pyface-4.1.0/pyface/toolkit.py", line 92, in init
raise NotImplementedError("the %s pyface backend doesn't implement %s" % (ETSConfig.toolkit, oname))
NotImplementedError: the wx pyface backend doesn't implement EditorAreaPane


Ran 23 tests in 1.044s

FAILED (errors=2)

Is it a problem with Xlib: extension "RANDR" missing on display ":10".
or does the test prove the wx pyface backend doesn't implement EditorAreaPane?

@pberkes
Contributor
pberkes commented Aug 31, 2012

PyFace's tasks framework is Qt-only (either PyQt or PySide). The wx pyface backend doesn't implement EditorAreaPane.

Those tests should be skipped if the backend is wx.

@idella
idella commented Aug 31, 2012

thank-you, skipping coming up

@idella
idella commented Apr 11, 2013

ok we're up to version 4.3.0

  • python2_7: running distutils-r1_run_phase python_test
    .........EEE......EEEE................

"ERROR: test_group_content_at_startup (test_dock_pane_toggle_group.DockPaneToggleGroupTestCase)"

NotImplementedError: the wx pyface backend doesn't implement TaskWindowBackend

"ERROR: test_react_to_dock_pane_added (test_dock_pane_toggle_group.DockPaneToggleGroupTestCase)"


NotImplementedError: the wx pyface backend doesn't implement TaskWindowBackend

"ERROR: test_react_to_dock_pane_removed (test_dock_pane_toggle_group.DockPaneToggleGroupTestCase)"


NotImplementedError: the wx pyface backend doesn't implement TaskWindowBackend

"ERROR: Test for collapse function when the collapse origin is an empty"


NotImplementedError: the wx pyface backend doesn't implement SplitEditorAreaPane

'ERROR: Test for collapse function when the source of collapse is not an empty"


NotImplementedError: the wx pyface backend doesn't implement SplitEditorAreaPane

"ERROR: Tests whether get_layout/set_layout work correctly by setting a given layout"


NotImplementedError: the wx pyface backend doesn't implement SplitEditorAreaPane

"ERROR: Does split function work correct?"


NotImplementedError: the wx pyface backend doesn't implement SplitEditorAreaPane


Ran 38 tests in 1.130s

FAILED (errors=7)

Based on The wx pyface backend doesn't implement EditorAreaPane., let's assume ditto for these above.
My preference is see tests pass rather than setting skip. A test is set if it's passable.
Based on Those tests should be skipped if the backend is wx,
what backend sees them pass? It seems the answer here is either PyQt or PySide, so more specifically, how do you cast aside wx and ensure a backend capable of passing tests that are intended to be passable and pass? Simply uninstall the wxpython package? Is there some invisible rule of precedence these packages have over one another when it comes to selecting a backend???

@idella
idella commented Apr 11, 2013

can you also comment on this little number?

from setup.py;
Programming Language :: Python

right, now that I know which versions are supported;

Failure: ImportError (cannot import name OrderedDict) ... ERROR
Failure: ImportError (cannot import name OrderedDict) ... ERROR
Failure: ImportError (cannot import name OrderedDict) ... ERROR
Failure: ImportError (cannot import name OrderedDict) ... ERROR

you know that OrderedDict was introduced in 2.7, right?

pyface/tasks/topological_sort.py

from collections import OrderedDict, defaultdict

rendering this version incapable of getting started on the testsuite under py2.6. Seeing the file is a core file topological_sort.py, it kind of follows it can't be given a tick for support of py2.6, yes?

@pberkes
Contributor
pberkes commented Apr 11, 2013

You set the default backend with the ETS_TOOLKIT environment variable:

export ETS_TOOLKIT=wx
export ETS_TOOLKIT=qt4

To choose between PyQt and PySide:

export QT_API=pyqt
export QT_API=pyside

It looks like the pyface project has not been strict enough in enforcing 2.6 compatibility... We should set up a TravisCI job for it and fix that dependency.

@idella
idella commented Apr 11, 2013

pberkes
thx for the immediacy of response. ok I set, by export, those variables.

ERROR: Test for collapse function when the collapse origin is an empty

NotImplementedError: the qt4 pyface backend doesn't implement SplitEditorAreaPane

ERROR: Failure: RuntimeError (Importing from wx backend after selecting qt4 backend!)

File "/var/tmp/portage/dev-python/pyface-4.3.0-r1/work/pyface-4.3.0/pyface/ui/wx/grid/tests/composite_grid_model_test_case.py", line 3, in

RuntimeError: Importing from wx backend after selecting qt4 backend!

ok I think I have figured what's going on here. nosetests is finding any and all tests as nosetests does.
Setting the env vars does the trick. Now the question is "is there a selection of backends that is assured of passing all tests?" I will probably try them all, but no harm in asking here.

ls pyface-4.3.0/pyface/ui/
init.py null qt4 wx

ok so there are the 2 backends. To run a test suite suite of success to all, does it follow to observe which ones bomb out under the selected backend and set them to ignore under nosetests?
Secondly, does it also follow to disable (maybe just move away) the tests under the folder of that backend in pyface-4.3.0/pyface/ui/?

thanks

@idella
idella commented Apr 15, 2013

I got this working as in a fixed state. The TravisCI job, is it done, is it planned? How do I find if and when pyface supports py2.5/6 again?

@pberkes
Contributor
pberkes commented Apr 18, 2013

I'm glad to hear you got the tests in a usable state.
The TravisCI job is not done, and not exactly planned, it's just something I would like to do.
Python 2.6 and 2.7 should be supported, not 2.5 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment