dataimport/test/test_massive_store.py
changeset 10868 ffb5b6c25cec
parent 10866 ed62ba97d79e
child 10869 575982c948a9
equal deleted inserted replaced
10867:ca73ee6d24ad 10868:ffb5b6c25cec
    54             cnx.create_entity('TimeZone', code=code, gmt=float(gmt),
    54             cnx.create_entity('TimeZone', code=code, gmt=float(gmt),
    55                                     dst=float(dst), raw_offset=float(raw_offset))
    55                                     dst=float(dst), raw_offset=float(raw_offset))
    56         timezone_code = dict(cnx.execute('Any C, X WHERE X is TimeZone, X code C'))
    56         timezone_code = dict(cnx.execute('Any C, X WHERE X is TimeZone, X code C'))
    57         # Push data
    57         # Push data
    58         for ind, infos in enumerate(ucsvreader(open(dumpname, 'rb'),
    58         for ind, infos in enumerate(ucsvreader(open(dumpname, 'rb'),
    59                                                separator='\t',
    59                                                delimiter='\t',
    60                                                ignore_errors=True)):
    60                                                ignore_errors=True)):
    61             latitude = self.cast(float, infos[4])
    61             latitude = self.cast(float, infos[4])
    62             longitude = self.cast(float, infos[5])
    62             longitude = self.cast(float, infos[5])
    63             population = self.cast(int, infos[14])
    63             population = self.cast(int, infos[14])
    64             elevation = self.cast(int, infos[15])
    64             elevation = self.cast(int, infos[15])