~ubuntu-branches/ubuntu/oneiric/swig1.3/oneiric

« back to all changes in this revision

Viewing changes to Examples/test-suite/python/python_nondynamic_runme.py

  • Committer: Bazaar Package Importer
  • Author(s): Benjamin Drung
  • Date: 2009-11-15 14:00:28 UTC
  • mfrom: (1.2.9 upstream) (2.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091115140028-me7amr2rie8zz1xn
Tags: 1.3.40-2ubuntu1
* Merge from Debian testing (LP: #356529), remaining changes:
  - Drop libchicken-dev from the build-depends (it's in universe)
  - Remove Pike from package description and from configure flags
  - drop "--without-mzscheme", we don't have it in our build-depends
  - use php-config5
  - Clean Runtime/ as well.
  - debian/rules (clean): Remove Lib/ocaml/swigp4.ml.
* debian/rules: Remove hardcoded python version.
* Remove upper limit for python from Build-Depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import python_nondynamic
 
2
 
 
3
aa = python_nondynamic.A()
 
4
 
 
5
aa.a = 1
 
6
aa.b = 2
 
7
try:
 
8
  aa.c = 2
 
9
  err = 0
 
10
except:
 
11
  err = 1
 
12
 
 
13
if not err:  
 
14
  raise RuntimeError, "A is not static"  
 
15
 
 
16
 
 
17
class B(python_nondynamic.A):
 
18
  c = 4
 
19
  def __init__(self):
 
20
    python_nondynamic.A.__init__(self)
 
21
    pass
 
22
  pass
 
23
 
 
24
 
 
25
 
 
26
bb = B()
 
27
bb.c = 3
 
28
try:
 
29
  bb.d = 2
 
30
  err = 0
 
31
except:
 
32
  err = 1
 
33
 
 
34
if not err:  
 
35
  raise RuntimeError, "B is not static"  
 
36
    
 
37
      
 
38
cc = python_nondynamic.C()
 
39
cc.d = 3