enthought / enthought/traitsui

Remove skips on DataFrameEditor tests that don't require GUI backend

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

Description

Quite a number of tests in `traitsui.tests.ui_editors.test_data_frame_editor` do not require GUI backend, and yet they are skipped if the backend is null.

These tests are still run when a backend exists, so the logic has been tested.
It is however desirable to keep components free of the requirement of a GUI backend until the point a backend is really needed, so it would be worthwhile to run these tests against a null backend.

By removing `skip_if_null` decorator for tests that don't call `edit_traits`, I can run the following tests:

Tests run with null backend

```
$ python -m nose.core -v traitsui.tests.ui_editors.test_data_frame_editor
/Users/kchoi/.edm/envs/traitsui-test-3.6-null/lib/python3.6/runpy.py:125: RuntimeWarning: 'nose.core' found in sys.modules after import of package 'nose', but prior to execution of 'nose.core'; this may result in unpredictable behaviour
warn(RuntimeWarning(msg))
traitsui.tests.ui_editors.test_data_frame_editor.test_adapter_get_item ... ok
traitsui.tests.ui_editors.test_data_frame_editor.test_adapter_empty_dataframe ... ok
traitsui.tests.ui_editors.test_data_frame_editor.test_adapter_no_rows ... ok
traitsui.tests.ui_editors.test_data_frame_editor.test_adapter_get_item_numerical ... ok
traitsui.tests.ui_editors.test_data_frame_editor.test_data_frame_editor ... SKIP: Test not working on the 'null' backend
traitsui.tests.ui_editors.test_data_frame_editor.test_data_frame_editor_alternate_adapter ... SKIP: Test not working on the 'null' backend
traitsui.tests.ui_editors.test_data_frame_editor.test_data_frame_editor_columns ... SKIP: Test not working on the 'null' backend
traitsui.tests.ui_editors.test_data_frame_editor.test_data_frame_editor_font_mapping ... SKIP: Test not working on the 'null' backend
traitsui.tests.ui_editors.test_data_frame_editor.test_data_frame_editor_format_mapping ... SKIP: Test not working on the 'null' backend
traitsui.tests.ui_editors.test_data_frame_editor.test_data_frame_editor_multi_select ... SKIP: Test not working on the 'null' backend
traitsui.tests.ui_editors.test_data_frame_editor.test_data_frame_editor_numerical_index ... SKIP: Test not working on the 'null' backend
traitsui.tests.ui_editors.test_data_frame_editor.test_data_frame_editor_text_data ... SKIP: Test not working on the 'null' backend
traitsui.tests.ui_editors.test_data_frame_editor.test_data_frame_editor_with_refresh ... SKIP: Test not working on the 'null' backend
traitsui.tests.ui_editors.test_data_frame_editor.test_data_frame_editor_with_update_refresh ... SKIP: Test not working on the 'null' backend
traitsui.tests.ui_editors.test_data_frame_editor.test_adapter_delete_start ... ok
traitsui.tests.ui_editors.test_data_frame_editor.test_adapter_delete_start_numerical_index ... ok
traitsui.tests.ui_editors.test_data_frame_editor.test_adapter_delete_middle ... ok
traitsui.tests.ui_editors.test_data_frame_editor.test_adapter_delete_middle_numerical_index ... ok
traitsui.tests.ui_editors.test_data_frame_editor.test_adapter_delete_end ... ok
traitsui.tests.ui_editors.test_data_frame_editor.test_adapter_delete_end_numerical_index ... ok
traitsui.tests.ui_editors.test_data_frame_editor.test_adapter_insert_start ... ok
traitsui.tests.ui_editors.test_data_frame_editor.test_adapter_insert_start_numerical_index ... ok
traitsui.tests.ui_editors.test_data_frame_editor.test_adapter_insert_middle ... ok
traitsui.tests.ui_editors.test_data_frame_editor.test_adapter_insert_middle_numerical_index ... ok
traitsui.tests.ui_editors.test_data_frame_editor.test_adapter_insert_end ... ok
traitsui.tests.ui_editors.test_data_frame_editor.test_adapter_insert_end_numerical_index ... ok
traitsui.tests.ui_editors.test_data_frame_editor.test_adapter_set_text ... ok
traitsui.tests.ui_editors.test_data_frame_editor.test_adapter_set_text_invalid ... ok
traitsui.tests.ui_editors.test_data_frame_editor.test_adapter_set_index_text ... ok
traitsui.tests.ui_editors.test_data_frame_editor.test_adapter_set_index_text_numeric ... ok
traitsui.tests.ui_editors.test_data_frame_editor.test_adapter_set_index_text_numeric_invalid ... ok
```

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.