PageRenderTime 21ms CodeModel.GetById 18ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/python/complextest_runme.py

#
Python | 17 lines | 11 code | 6 blank | 0 comment | 2 complexity | 4e30274c02ac586b3ef44da4b3ab90d6 MD5 | raw file
 1import complextest
 2
 3a = complex(-1,2)
 4
 5if complextest.Conj(a) != a.conjugate():
 6  raise RuntimeError, "bad complex mapping"
 7
 8if complextest.Conjf(a) != a.conjugate():
 9  raise RuntimeError, "bad complex mapping"
10
11
12v = (complex(1,2), complex(2,3), complex(4,3), 1)
13
14try:
15  complextest.Copy_h(v)
16except:
17  pass