'''
import multiprocessing
+import unittest
from . import engine as engine
from . import config as config_mod
from . import driver as driver_mod
from . import ui as ui
+
class Hooke (object):
def __init__(self, config=None, debug=0):
self.debug = debug
finally:
app.close()
+class TestHooke (unittest.TestCase):
+ def test_queue_safe(self):
+ """Ensure :class:`Hooke` is :class:`multiprocessing.Queue`-safe.
+ """
+ from multiprocessing import Queue
+ q = Queue()
+ a = Hooke()
+ q.put(a)
+ b = q.get(a)
+ for attribute_name in dir(a):
+ a_attr = getattr(a, attribute_name)
+ b_attr = getattr(b, attribute_name)
+ self.failUnless(a_attr == b_attr)
+
if __name__ == '__main__':
main()