diff options
Diffstat (limited to 'trunk/Examples/test-suite/python/disown_runme.py')
-rw-r--r-- | trunk/Examples/test-suite/python/disown_runme.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/trunk/Examples/test-suite/python/disown_runme.py b/trunk/Examples/test-suite/python/disown_runme.py new file mode 100644 index 000000000..b8cae077a --- /dev/null +++ b/trunk/Examples/test-suite/python/disown_runme.py @@ -0,0 +1,25 @@ +from disown import * + +a = A() + +tmp = a.thisown + +a.thisown = 0 +if a.thisown: + raise RuntimeError + +a.thisown = 1 +if (not a.thisown): + raise RuntimeError + +a.thisown = tmp +if (a.thisown != tmp): + raise RuntimeError + + +b = B() + +b.acquire(a) + +if a.thisown: + raise RuntimeError |