Created
January 14, 2015 21:46
-
-
Save gsmcwhirter/518ab85f5cb64cea951e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyglet.text as pygtext | |
class BaseObject(object): | |
pass | |
class Stuff(BaseObject, pygtext.Label): | |
pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from mock import Mock | |
import sys | |
MOCKS = { | |
'pyglet.text': Mock(['Label']) | |
} | |
sys.modules.update((mod_name, mod_val) for mod_name, mod_val in MOCKS.items()) | |
import source #see below -- errors about not being able to handle the multiple inheritance | |
#Traceback (most recent call last): | |
# File "tests.py", line 11, in <module> | |
# import source #see below -- errors about not being able to handle the multiple inheritance | |
# File "/Users/gsmcwhirter/Sources/wwgamelib/tests/source.py", line 6, in <module> | |
# class Stuff(BaseObject, pygtext.Label): | |
#TypeError: Error when calling the metaclass bases | |
# metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment