Use exceptions instead of printing to stdout. Part of an effort to convert Python tests to python 3 syntax.
19 lines
248 B
Python
19 lines
248 B
Python
import director_unroll
|
|
|
|
|
|
class MyFoo(director_unroll.Foo):
|
|
|
|
def ping(self):
|
|
return "MyFoo::ping()"
|
|
|
|
|
|
a = MyFoo()
|
|
|
|
b = director_unroll.Bar()
|
|
|
|
b.set(a)
|
|
c = b.get()
|
|
|
|
|
|
if not (a.this == c.this):
|
|
raise RuntimeError("{} {}".format(a, c))
|