コード例 #1
0
ファイル: test_parser.py プロジェクト: nens/metfilelib
    def test_error_with_a_result_when_second_comma_missing(self):
        reader = get_mock_reader([
            b"<REEKS>deeleen,deeltwee</REEKS>\n",
            b"<PROFIEL>O-BR00001927_516,PROFIEL_516,20120421,0.00,NAP,ABS,2,XY,152168.401,444100.055,\n",
            b"<METING>22,999,152168.401,444100.055,2.206,2.206</METING>\n",
            b"<METING>99,999,152168.475,444100.136,1.556,1.661</METING>\n",
            b"</PROFIEL>\n"
        ])

        result = parser.parse_series(reader)
        self.assertFalse(reader.success)
        self.assertNotEqual(result, None)
コード例 #2
0
ファイル: test_parser.py プロジェクト: nens/metfilelib
    def test_invalid_characters_in_reeks(self):
        reader = get_mock_reader([
            b"<REEKS>deeleen,deeltw<ee,</REEKS>\n",
            b"<PROFIEL>O-BR00001927_516,PROFIEL_516,20120421,0.00,NAP,ABS,2,XY,152168.401,444100.055,\n",
            b"<METING>22,999,152168.401,444100.055,2.206,2.206</METING>\n",
            b"<METING>99,999,152168.475,444100.136,1.556,1.661</METING>\n",
            b"</PROFIEL>\n"
        ])

        result = parser.parse_series(reader)
        self.assertFalse(reader.success)
        self.assertNotEqual(result, None)