kxgames / glooey

An object-oriented GUI library for pyglet.
MIT License
91 stars 6 forks source link

Tests fail #46

Closed UplinkPhobia closed 3 years ago

UplinkPhobia commented 3 years ago

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.

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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. :-)