Skip to content

Unit test TestCoreState.test_smart_canvas fails #51

@pottumuusi

Description

@pottumuusi

There is a slight variation in the error when running pytest with 'main' branch (commit c76be87) checked out and when running with 'XI-dev-2025' branch (81ef2d2) checked out.

All of the unit tests were passing at commit:
1152003
Fix pytests (#28)

The unit test broke at or before commit:
5586cd7
Production deployment fixes 2025-12-09 (#42)

Error in main branch:

>       assert type(core._state) is type(Active())                                                                                                                                                                
E       AssertionError: assert <class 'smart_canvas.core.Idle'> is <class 'smart_canvas.core.Active'>                                                                                                             
E        +  where <class 'smart_canvas.core.Idle'> = type(<smart_canvas.core.Idle object at 0x7cce38101af0>)                                                                                                      
E        +    where <smart_canvas.core.Idle object at 0x7cce38101af0> = <smart_canvas.core.CanvasCore object at 0x7cce38101eb0>._state                                                                            
E        +  and   <class 'smart_canvas.core.Active'> = type(<smart_canvas.core.Active object at 0x7ccde2ce8380>)                                                                                                  
E        +    where <smart_canvas.core.Active object at 0x7ccde2ce8380> = Active()

tests/core_test.py:44: AssertionError

Error in XI-dev-2025 branch:

>       assert type(core._state) is type(ShowPic())                                                                                                                                                               
E       AssertionError: assert <class 'smart_canvas.core.Painting'> is <class 'smart_canvas.core.ShowPic'>
E        +  where <class 'smart_canvas.core.Painting'> = type(<smart_canvas.core.Painting object at 0x744980093d40>)
E        +    where <smart_canvas.core.Painting object at 0x744980093d40> = <smart_canvas.core.CanvasCore object at 0x7449849f7b60>._state
E        +  and   <class 'smart_canvas.core.ShowPic'> = type(<smart_canvas.core.ShowPic object at 0x7449702c7470>)
E        +    where <smart_canvas.core.ShowPic object at 0x7449702c7470> = ShowPic()
                                                                                                         
tests/core_test.py:79: AssertionError

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions