Skip to content

Intermittent test_color failure on Winforms #2000

@mhsmith

Description

@mhsmith

From #1989 (review):

_________________________________ test_color __________________________________
Traceback (most recent call last):
  File "D:\a\toga\toga\testbed\build\testbed\windows\app\src\app\tests\widgets\properties.py", line 355, in test_color
    assert_color(probe.color, color)
  File "D:\a\toga\toga\testbed\build\testbed\windows\app\src\app\tests\assertions.py", line 25, in assert_color
    assert (actual.r, actual.g, actual.b, actual.a) == (
AssertionError: assert (50, 128, 200, 0.0) == (50, 128, 200, 1 � 3.9e-03)
  At index 3 diff: 0.0 != 1 � 3.9e-03
  Full diff:
  - (50, 128, 200, 1 � 3.9e-03)
  ?                ^^^^^ --- -
  + (50, 128, 200, 0.0)
  ?                ^

In this run, it failed with exactly the same error in multilinetextinput, numberinput, passwordinput, switch and textinput.

What this indicates is that it was expecting an alpha of 1, but it got a value of 0. 3.9e-03 is the expected accuracy of 1/255, and the unprintable character is supposed to be a +/- symbol.

I've seen this locally a few times, but I have no idea what's causing it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA crash or error in behavior.windowsThe issue relates to Microsoft Windows support.
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions