/trunk/Examples/test-suite/python/disown_runme.py
# · Python · 25 lines · 16 code · 9 blank · 0 comment · 4 complexity · 252de2e97e95297748c9481ea1a1d707 MD5 · raw file
- 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