def __init__(self, name, host='127.0.0.1', port=27017):
        self.name = name
        self.host = host
        self.port = port
def test_unions(self):
        for code, tp in self.formats.items():
            class X(Union):
                _fields_ = [("x", c_char),
                            ("y", tp)]
            self.assertEqual((sizeof(X), code),
                                 (calcsize("%c" % (code)), code))