Esempio n. 1
0
    def test_get_radolan_header_token_pos(self):
        header = ('RW030950100000814BY1620130VS 3SW   2.13.1PR E-01'
                  'INT  60GP 900x 900MS 58<boo,ros,emd,hnr,pro,ess,'
                  'asd,neu,nhb,oft,tur,isn,fbg,mem>')

        test_head = radolan.get_radolan_header_token()
        test_head['PR'] = (43, 48)
        test_head['GP'] = (57, 66)
        test_head['INT'] = (51, 55)
        test_head['SW'] = (32, 41)
        test_head['VS'] = (28, 30)
        test_head['MS'] = (68, 128)
        test_head['BY'] = (19, 26)

        head = radolan.get_radolan_header_token_pos(header)
        self.assertDictEqual(head, test_head)

        header = ('RQ210945100000517BY1620162VS 2SW 1.7.2PR E-01'
                  'INT 60GP 900x 900VV 0MF 00000002QN 001'
                  'MS 67<bln,drs,eis,emd,ess,fbg,fld,fra,ham,han,muc,'
                  'neu,nhb,ros,tur,umd>')
        test_head = {'BY': (19, 26), 'VS': (28, 30), 'SW': (32, 38),
                     'PR': (40, 45), 'INT': (48, 51), 'GP': (53, 62),
                     'MS': (85, 153), 'LV': None, 'CS': None, 'MX': None,
                     'BG': None, 'ST': None, 'VV': (64, 66), 'MF': (68, 77),
                     'QN': (79, 83), 'VR': None, 'U': None}
        head = radolan.get_radolan_header_token_pos(header)
        self.assertDictEqual(head, test_head)
Esempio n. 2
0
    def test_get_radolan_header_token_pos(self):
        header = ('RW030950100000814BY1620130VS 3SW   2.13.1PR E-01'
                  'INT  60GP 900x 900MS 58<boo,ros,emd,hnr,pro,ess,'
                  'asd,neu,nhb,oft,tur,isn,fbg,mem>')

        test_head = radolan.get_radolan_header_token()
        test_head['PR'] = (43, 48)
        test_head['GP'] = (57, 66)
        test_head['INT'] = (51, 55)
        test_head['SW'] = (32, 41)
        test_head['VS'] = (28, 30)
        test_head['MS'] = (68, 128)
        test_head['BY'] = (19, 26)

        head = radolan.get_radolan_header_token_pos(header)
        self.assertDictEqual(head, test_head)

        header = ('RQ210945100000517BY1620162VS 2SW 1.7.2PR E-01'
                  'INT 60GP 900x 900VV 0MF 00000002QN 001'
                  'MS 67<bln,drs,eis,emd,ess,fbg,fld,fra,ham,han,muc,'
                  'neu,nhb,ros,tur,umd>')
        test_head = {'BY': (19, 26), 'VS': (28, 30), 'SW': (32, 38),
                     'PR': (40, 45), 'INT': (48, 51), 'GP': (53, 62),
                     'MS': (85, 153), 'LV': None, 'CS': None, 'MX': None,
                     'BG': None, 'ST': None, 'VV': (64, 66), 'MF': (68, 77),
                     'QN': (79, 83)}
        head = radolan.get_radolan_header_token_pos(header)
        self.assertDictEqual(head, test_head)
Esempio n. 3
0
 def test_get_radolan_header_token(self):
     keylist = ['BY', 'VS', 'SW', 'PR', 'INT', 'GP',
                'MS', 'LV', 'CS', 'MX', 'BG', 'ST',
                'VV', 'MF', 'QN', 'VR', 'U']
     head = radolan.get_radolan_header_token()
     for key in keylist:
         self.assertIsNone(head[key])
Esempio n. 4
0
 def test_get_radolan_header_token(self):
     keylist = ['BY', 'VS', 'SW', 'PR', 'INT', 'GP',
                'MS', 'LV', 'CS', 'MX', 'BG', 'ST',
                'VV', 'MF', 'QN']
     head = radolan.get_radolan_header_token()
     for key in keylist:
         self.assertIsNone(head[key])