traits
traits copied to clipboard
Tests fail with latest Traits and TraitsUI from PyPI
I'm seeing a test failure with the latest Traits and TraitsUI from PyPI, on Python 3.11. (I haven't tested with other Python versions, but it likely affects those, too.)
Steps to reproduce:
- Create a new Python 3.11 venv, and activate it.
- Run
pip install traits traitsui
- Run
python -m unittest discover -v traits
Expected results: the test suite runs to completion.
Actual results: we get the following test failure:
======================================================================
FAIL: test_edit_not_given (traits.tests.test_configure_traits.TestConfigureTraits.test_edit_not_given)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/mdickinson/.venvs/traits/lib/python3.11/site-packages/traits/tests/test_configure_traits.py", line 158, in test_edit_not_given
self.assertEqual(len(captured_warnings), 0)
AssertionError: 2 != 0
----------------------------------------------------------------------
This is likely to be an overzealous test, but as well as tightening this test, we should investigate what the warnings are, where they're coming from, and how we can fix them.