Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failures, possibly related to PySide 6.6.1 #2038

Open
corranwebster opened this issue Dec 11, 2023 · 5 comments
Open

Test failures, possibly related to PySide 6.6.1 #2038

corranwebster opened this issue Dec 11, 2023 · 5 comments

Comments

@corranwebster
Copy link
Contributor

Some errors I haven’t seen before:

======================================================================
FAIL: test_propagate_errors (traitsui.tests.editors.test_instance_editor.TestInstanceEditor)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/runner/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/traitsui/tests/editors/test_instance_editor.py", line 324, in test_propagate_errors
    self.assertFalse(ok_button.inspect(IsEnabled()))
AssertionError: True is not false

======================================================================
FAIL: test_propagate_errors_switch_selection (traitsui.tests.editors.test_instance_editor.TestInstanceEditor)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/runner/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/traitsui/tests/editors/test_instance_editor.py", line 348, in test_propagate_errors_switch_selection
    self.assertFalse(ok_button.inspect(IsEnabled()))
AssertionError: True is not false

----------------------------------------------------------------------

On MacOS and Windows (but less reliably), Python 3.8-3.11, PySide 6.6.1

@corranwebster
Copy link
Contributor Author

Can replicate locally on MacOS by running the test suite.

@corranwebster
Copy link
Contributor Author

Errors don't occur for PySide6 6.6.0.

I have also tested the classes manually and they behave correctly, so this is an issue with the test, not with the underlying TraitsUI code.

@corranwebster
Copy link
Contributor Author

corranwebster commented Jan 5, 2024

Digging in to the test, it looks like the error flag is getting set and then reset, and the field ends up containing just the last letter typed.

ETA: on PySide6 6.6.0 the error flag is set twice, but the reset is after the values are being tested - and the field contains the expected text - it seems like there may be an issue with timing/event ordering/dispatch, where the error status is being reset before the state testing takes place.

For now, the simple fix may be to skip the tests for PySide 6.6.1.

corranwebster added a commit that referenced this issue Jan 8, 2024
See Issue #2038 - this is a work-around to get tests back into working
state, but does not resolve the issue.

Includes incidental black and isort clean-up.
@corranwebster
Copy link
Contributor Author

Seem to be seeing for PySide 6.6.3 as well, after not seeing it on 6.6.2.

@mdickinson
Copy link
Member

I'm also seeing it on 6.6.3 (specifically, 6.6.3.1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants