OKAY. I've figured out what caused the test to fail; if you go and uncomment the line #import zappyui.Keybinds (or, well, at least when I do it, I dunno what you're doing) the second graphical test will fail. I...wish I knew why, and feel woefully unprepared to diagnose the cause, but we'll see how far I get.
Okay I'm confused as all hell; look in Keybinds.py for a primer. So, what's happening seems to be this: if I write the __init__ function of Keybinds to have a default parameter, AND I define DEFAULT_KEYBINDS, the tests stop working like I thought they would. This is incredibly frustrating and I want to understand whatever it is that's causing this. What is my next move?
Reproduced the strange behavior. Uh, I have a sinking feeling that maybe it's a lack of reading the documentation, but I've got no internet while I work, so I'm going to stick with poking at it for now.
Cleaning. By removing DummyCamera from this entirely it works.
OKAY, got it down to the line in on_draw() in testCameraDraw - if you uncomment self.default_camera.draw(), it will close the second test immediately upon finishing the first.
It's now giving me an AttributeError for testCameraDraw; it says that self.default_camera is None. Is there some sort of...difficulty with the setUp method it's running in to?
OKAY. I think I found it. In on_draw() there's an else: pyglet.app.exit() that I believe fires even after you hit the key, because of the way the timing works out (it calls draw before the keypress finishes registering I think and then when it resolves it somehow propogates to the other test? I am unsure). Let me look at the main file and try getting rid of it.
Okay. It fixed the problem, but that still doesn't tell me why in the heck Keybinds was influencing whether the problem was popping up in my other tests.
Okay now that it's sorted (though I'm still short on crucial understanding - yet I also want to progress! A quandry!) back to working on the Keybind object.
Tests written for Keybinds.
Keybinds is implemented, tested. UIController next.
Tests for UIController.
Next task: setup_callbacks, then move on to UIScreenLevel. Currently it passes tests (tests had some minor issues; fixed them). Isn't done because I have no idea how to test setup_callbacks and it's almost 5.