Ejemplo n.º 1
0
def loopBackTest(classRef, value):
    s = StringIO()
    o = classRef()
    o.write(WriteContext(s), value)
    s.seek(0)
    r = hessian.readObject(ParseContext(s))
    res = False
    try:
        res = r == value
    except RuntimeError:
        # Fall-back in case of recursion error
        res = `r` == `value`        
    assert res
Ejemplo n.º 2
0
def loopBackTest(classRef, value):
    s = StringIO()
    o = classRef()
    o.write(WriteContext(s), value)
    s.seek(0)
    r = hessian.readObject(ParseContext(s))
    res = False
    try:
        res = r == value
    except RuntimeError:
        # Fall-back in case of recursion error
        res = ` r ` == ` value `
    assert res
Ejemplo n.º 3
0
 def wr(val):
     s = StringIO()
     hessian.Date().write(WriteContext(s), datetime.fromtimestamp(val))
     s.seek(0)
     return hessian.readObject(ParseContext(s))    
Ejemplo n.º 4
0
 def wr(val):
     s = StringIO()
     hessian.Date().write(WriteContext(s), datetime.fromtimestamp(val))
     s.seek(0)
     return hessian.readObject(ParseContext(s))