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

Tests fail #46

Closed
UplinkPhobia opened this issue Feb 23, 2021 · 3 comments
Closed

Tests fail #46

UplinkPhobia opened this issue Feb 23, 2021 · 3 comments

Comments

@UplinkPhobia
Copy link

I was trying to understand the different widget (especially the ones that have no documentation) by running the tests. However they don't seem to pass.

  • The pytest configuration file seems to only work under pytest<6.0, as some deprecated things have been removed. Using an older pytest version works, but I'm not sure that's the intended behaviour
  • Even after rolling back, the tests fail on scrolling/demo_viewport

demo_viewport.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = PanningGui(id=0f70), window = XlibWindow(width=640, height=480)
cursor = <ImageData 13x19>, hotspot = (4, 24)

    def __init__(self, window, cursor, hotspot, *, batch=None, group=None):
        mouse_group = pyglet.graphics.OrderedGroup(1, parent=group)
        gui_group = pyglet.graphics.OrderedGroup(0, parent=group)
    
>       super().__init__(window, batch=batch, group=gui_group)

../../../../.local/share/virtualenvs/scrolling-usqzJ7ah/lib/python3.9/site-packages/glooey/root.py:172: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = PanningGui(id=0f70), window = XlibWindow(width=640, height=480)

    def __init__(self, window, *, cursor=None, hotspot=None,
            clear_before_draw=None, batch=None, group=None):
    
>       super().__init__(window, batch, group)

../../../../.local/share/virtualenvs/scrolling-usqzJ7ah/lib/python3.9/site-packages/glooey/root.py:105: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 


[ ... ]


../../../../.local/share/virtualenvs/scrolling-usqzJ7ah/lib/python3.9/site-packages/glooey/widget.py:1659: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = PanningGui(id=0f70)

    def do_undraw(self):
>       self.cursor.visible = False
E       AttributeError: 'PanningGui' object has no attribute 'cursor'

../../../../.local/share/virtualenvs/scrolling-usqzJ7ah/lib/python3.9/site-packages/glooey/root.py:201: AttributeError

@kalekundert
Copy link
Contributor

Hmmm, that definitely isn't right. I'll try to get the tests working (with the most recent pytest) this week.

Sorry the documentation is so lacking. I know it's a problem, but it's just on my back burner.

@UplinkPhobia
Copy link
Author

Well to be honest the documentation is pretty good, but I couldn't help but try finding what were those widgets that weren't explained :p
I played a bit with the tests and they are actually a cool (and quicker) way to understand what everything does, so it's not a big deal ^^ No need to apologize for anything like that on a free open source project ^^'

@kalekundert
Copy link
Contributor

Ok, I think I fixed all these issues. Thanks for pointing them out; there were actually a bunch of tests failing. I need to remember to run the whole test suite more often. :-)

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