comparison utils/seriestables/test_series.py @ 218:4c137f16b013

Modifications pour stocker des timestamps/cpuclock avec chaque rangée créée, selon suggestion de Yoshua ce matin
author fsavard
date Wed, 10 Mar 2010 20:13:45 -0500
parents a96fa4de06d2
children e172ef73cdc5
comparison
equal deleted inserted replaced
213:a96fa4de06d2 218:4c137f16b013
5 from jobman import DD 5 from jobman import DD
6 6
7 from tables import * 7 from tables import *
8 8
9 from series import * 9 from series import *
10 import series
10 11
11 12
12 def compare_floats(f1,f2): 13 def compare_floats(f1,f2):
13 if f1-f2 < 1e-3: 14 if f1-f2 < 1e-3:
14 return True 15 return True
142 143
143 def test_get_desc(): 144 def test_get_desc():
144 h5f_path = tempfile.NamedTemporaryFile().name 145 h5f_path = tempfile.NamedTemporaryFile().name
145 h5f = openFile(h5f_path, "w") 146 h5f = openFile(h5f_path, "w")
146 147
147 desc = get_description_with_n_ints_n_floats(("col1","col2"), ("col3","col4")) 148 desc = series._get_description_with_n_ints_n_floats(("col1","col2"), ("col3","col4"))
148 149
149 mytable = h5f.createTable('/', 'mytable', desc) 150 mytable = h5f.createTable('/', 'mytable', desc)
150 151
151 # just make sure the columns are there... otherwise this will throw an exception 152 # just make sure the columns are there... otherwise this will throw an exception
152 mytable.cols.col1 153 mytable.cols.col1