# HG changeset patch # User David Grundberg # Date 1244487238 -7200 # Node ID 8135e840ef0e3488b60fef8d9da75f88d5d80e6d # Parent bb7c52547fcf5ed7ac22d2fccccebd918c8a88c4# Parent 46e6fa692e0c503d85e7f574ab67a08fde0aad74 Cherry-picking test changes diff -r bb7c52547fcf -r 8135e840ef0e test/test.py --- a/test/test.py Mon Jun 08 20:51:11 2009 +0200 +++ b/test/test.py Mon Jun 08 20:53:58 2009 +0200 @@ -124,20 +124,20 @@ try: variables[name] = value if name not in variables: - print "FAIL: set/get: ", name,": Should exist, not there." + fail("set/get: %s: Should exist, not there." % name) result, = pytave.feval(1, "isequal", value, variables[name]) if not result: - print "FAIL: set/get: ", name," -> ",value," results diverged" + fail("set/get: %s -> %s: results diverged" % (name, value)) except Exception, e: - print "FAIL: set/get: ", name, ":", e + fail("set/get: %s" % name, e) def testexception(exception, func): try: func() - print "FAIL: ", name + fail("Expecting %s but nothing was raised." % repr(exception)) except Exception, e: if not isinstance(e, exception): - print "FAIL:", name, ":", e + fail("Expecting %s but got %s instead" % (repr(exception), repr(e)), e) def testlocalscope(x): @@ -163,7 +163,6 @@ except Exception, e: fail("testlocalscope: %s" % (x,), e) - testmatrix(alimit_int32) testmatrix(alimit_int16) testmatrix(alimit_int8) @@ -252,8 +251,6 @@ testparseerror(1, "endfunction") testevalexpect(1, "2 + 2", (4,)) testevalexpect(1, "{2}", ([2],)) - -# FIXME testevalexpect(1, "struct('foo', 2)", ({'foo': 2},)) testsetget(pytave.locals, "xxx", [1,2,3])