diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2006-09-23 00:00:58 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2006-09-23 00:00:58 +0000 |
commit | 97e9f0712005998ad90d2834a5aadef17811510f (patch) | |
tree | 85444af1d8d25ed4497ab04fd91bea7a4aa9479c /Examples/test-suite/python | |
parent | d096cc16138afcc1cf6d80c41d868ec0689d4981 (diff) | |
download | swig-97e9f0712005998ad90d2834a5aadef17811510f.tar.gz |
#1506840 testcase - directors with virtual extended methods
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9327 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Examples/test-suite/python')
-rw-r--r-- | Examples/test-suite/python/director_extend_runme.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Examples/test-suite/python/director_extend_runme.py b/Examples/test-suite/python/director_extend_runme.py new file mode 100644 index 000000000..1ab58676a --- /dev/null +++ b/Examples/test-suite/python/director_extend_runme.py @@ -0,0 +1,20 @@ +# Test case from bug #1506850 +#"When threading is enabled, the interpreter will infinitely wait on a mutex the second +#time this type of extended method is called. Attached is an example +#program that waits on the mutex to be unlocked." + +from director_extend import * + +class MyObject(SpObject): + def __init__(self): + SpObject.__init__(self) + return + + def getFoo(self): + return 123 + +m = MyObject() +if m.dummy() != 666: + raise RuntimeError, "1st call" +if m.dummy() != 666: # Locked system + raise RuntimeError, "2nd call" |