Mock multiqueue
- kivy mock now uses a mock multiqueue, as the existing code didn't handle all problems. For example, trying to load OpenSSL currently crashes on my M1 Mac, so I can't even add an exception handler to fall back. With this patch, the kivy_mock simply forces a fallback to Queue
This commit is contained in:
parent
eb5f791cb6
commit
36c2a80060
|
@ -1,7 +1,11 @@
|
|||
"""Mock kivy app with mock threads."""
|
||||
# pylint: disable=unused-import
|
||||
# flake8: noqa:E401
|
||||
|
||||
from pybitmessage import state
|
||||
from pybitmessage.bitmessagekivy.mpybit import NavigateApp
|
||||
|
||||
import multiqueue
|
||||
from class_addressGenerator import FakeAddressGenerator
|
||||
|
||||
|
||||
|
|
7
src/mock/multiqueue.py
Normal file
7
src/mock/multiqueue.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
"""
|
||||
Mock MultiQueue (just normal Queue)
|
||||
"""
|
||||
|
||||
from six.moves import queue
|
||||
|
||||
MultiQueue = queue.Queue
|
|
@ -8,13 +8,7 @@ from six.moves import queue
|
|||
try:
|
||||
from multiqueue import MultiQueue
|
||||
except ImportError:
|
||||
try:
|
||||
from .multiqueue import MultiQueue
|
||||
except ImportError:
|
||||
import sys
|
||||
if 'bitmessagemock' not in sys.modules:
|
||||
raise
|
||||
MultiQueue = queue.Queue
|
||||
|
||||
|
||||
class ObjectProcessorQueue(queue.Queue):
|
||||
|
|
Reference in New Issue
Block a user