# Path: mom/collections.py
# class SetQueue(queue.Queue):
# class AttributeDict(dict):
#   def _init(self, maxsize):
#   def _put(self, item):
#   def _get(self):
#   def __init__(self, *args, **kw):
#   def __repr__(self):
#   def __delattr__(self, name):
#   def __getattr__(self, name):
#   def __setattr__(self, name, value):


import unittest2
  import queue as Queue
  import Queue
import threading
from mom import collections
    self.assertEqual(d.another_thing, "haha")

    d = collections.attrdict(something="foobar", another_thing="haha")
    self.assertEqual(d.something, "foobar")
    self.assertEqual(d.another_thing, "haha")

  def test_AttributeError_when_key_not_found(self):
    d = collections.AttributeDict(something="foobar", another_thing="haha")
    a = collections.attrdict(something="foobar", another_thing="haha")

    def foo_wrapper(d):
      return d.not_present

    self.assertRaises(AttributeError, foo_wrapper, d)
    self.assertRaises(AttributeError, foo_wrapper, a)

  def test_delattr(self):
    d = collections.AttributeDict(something="foobar", another_thing="haha")
    del d.another_thing
    self.assertDictEqual(d, dict(something="foobar"))
    del d["something"]
    self.assertDictEqual(d, dict())

  def test_getattr(self):
    d = collections.AttributeDict(something="foobar", another_thing="haha")
    d["oob"] = "blah"
    self.assertEqual(d.something, "foobar")
    self.assertEqual(d.oob, "blah")

  def test_setattr(self):

# Path: mom/collections.py
# class SetQueue(queue.Queue):
# class AttributeDict(dict):
#   def _init(self, maxsize):
#   def _put(self, item):
#   def _get(self):
#   def __init__(self, *args, **kw):
#   def __repr__(self):
#   def __delattr__(self, name):
#   def __getattr__(self, name):
#   def __setattr__(self, name, value):


# Path: mom/tests/test_mom_collections.py
import unittest2
  import queue as Queue
  import Queue
import threading
from mom import collections

    self.assertEqual(d.another_thing, "haha")

    d = collections.attrdict(something="foobar", another_thing="haha")
    self.assertEqual(d.something, "foobar")
    self.assertEqual(d.another_thing, "haha")

  def test_AttributeError_when_key_not_found(self):
    d = collections.AttributeDict(something="foobar", another_thing="haha")
    a = collections.attrdict(something="foobar", another_thing="haha")

    def foo_wrapper(d):
      return d.not_present

    self.assertRaises(AttributeError, foo_wrapper, d)
    self.assertRaises(AttributeError, foo_wrapper, a)

  def test_delattr(self):
    d = collections.AttributeDict(something="foobar", another_thing="haha")
    del d.another_thing
    self.assertDictEqual(d, dict(something="foobar"))
    del d["something"]
    self.assertDictEqual(d, dict())

  def test_getattr(self):
    d = collections.AttributeDict(something="foobar", another_thing="haha")
    d["oob"] = "blah"
    self.assertEqual(d.something, "foobar")
    self.assertEqual(d.oob, "blah")

  def test_setattr(self):

    d = collections.AttributeDict()