PageRenderTime 51ms CodeModel.GetById 23ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
Python | 22 lines | 16 code | 6 blank | 0 comment | 5 complexity | 1bf85336b34d685891c3cc1ed9db5f79 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. import inout
  2. a = inout.AddOne1(1)
  3. if a != 2:
  4. raise RuntimeError
  5. a = inout.AddOne3(1,1,1)
  6. if a != [2,2,2]:
  7. raise RuntimeError
  8. a = inout.AddOne1p((1,1))
  9. if a != (2,2):
  10. raise RuntimeError
  11. a = inout.AddOne2p((1,1),1)
  12. if a != [(2,2),2]:
  13. raise RuntimeError
  14. a = inout.AddOne3p(1,(1,1),1)
  15. if a != [2,(2,2),2]:
  16. raise RuntimeError