# List Base Tests s = Rapicorn.BoolSeq([True, False, "A", [], 88, None]) s = Rapicorn.StringSeq(['1', 'B']) # assert_raises (TypeError, Rapicorn.StringSeq, [ None ]) # Record Tests # Pixbuf p = Rapicorn.Pixbuf() p.row_length = 2 p.pixels = [0x00000000, 0xff000000] p.variables = ['meta=foo'] assert p.row_length == 2 assert p.pixels == [0x00000000, -16777216] assert p.variables == ['meta=foo'] # UpdateSpan u = Rapicorn.UpdateSpan() u.start = 7 u.length = 20 assert u.start == 7 and u.length == 20 assert u._asdict() == collections.OrderedDict([('start', 7), ('length', 20)]) def invalid_assignment(u): u.no_such_dummy = 999 assert_raises(AttributeError, invalid_assignment, u) # UpdateRequest r = Rapicorn.UpdateRequest() r.kind = Rapicorn.UpdateKind.CHANGE r.rowspan = u