| Home | Trees | Indices | Help |
|---|
|
|
1 # -*- coding: UTF-8 -*- 2 3 from unittest import TestCase 4217 from ..dependency import FortranType 8 from ctypes import c_int, c_double 9 class TestType(FortranType): 10 _fields_ = [ 11 ('field1', c_int), 12 ('field2', c_double), 13 ] 14 _fortran_name_ = 'testtype'15 testdata = TestType() 16 self.assertEqual(testdata.to_text(), 17 """type testtype 18 integer*4 :: field1 19 real*8 :: field2 20 end type testtype""")23 from ..dependency import FortranType 24 from ctypes import c_int, c_double 25 class TestType(FortranType): 26 _fields_ = [ 27 ('field1', c_int), 28 ('field2', c_double), 29 ] 30 _fortran_name_ = 'testtype'31 testdata = TestType(field1=1, field2=1.0) 32 self.assertEqual(str(testdata), 33 """type testtype 34 integer*4 :: field1 = 1 35 real*8 :: field2 = 1.0 36 end type testtype""") 37
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Wed Dec 29 13:41:01 2010 | http://epydoc.sourceforge.net |