enthought / enthought/pyface

Expose helper functions for selectively run tests based on toolkit

Open
#812 0 comments 0 reactions 0 assignees View on GitHub
component: test suite
Dominant language
Python
Stars
115
Forks
54
PR merge metrics
No merged PRs in 30d

Description

While we aim to have toolkit agnostic tests, toolkit specific tests are inevitable, e.g. if the tests are targeting a bug or a behaviour only found on certain toolkits.

These tests typically have skips conditional on the GUI toolkit.
e.g. At a coarser level: Qt VS wxPython VS Null
https://github.com/enthought/pyface/blob/0d1516e60051e52251627123891dff9085737f4c/pyface/tests/test_widget.py#L202

There are also conditions based on more specific version of the backend, or the specific implementation of the Python wrapper, e.g.: Qt4 VS Qt5, or PySide VS PyQt
https://github.com/enthought/pyface/blob/0d1516e60051e52251627123891dff9085737f4c/pyface/tests/test_confirmation_dialog.py#L169-L171

Similar use cases can be found in TraitsUI, Enable and Mayavi ...

Upon designing and exposing these public helper functions, it is worth considering future proofing the names, e.g. we don't want to end up using `skip_if_qt5` to mean skipping the test if it is either Qt5 or Qt6.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.