def test_quantity_number(self): s = r"#COLUMNINFO= 1, m, Sondeerlengte, 1" v = utils.parse_quantity_number(s, 1) self.assertEqual(v, 1) h = {"COLUMNINFO": [["1", "m", "Sondeerlengte", "1"]]} v = utils.parse_quantity_number(h, 1) self.assertEqual(v, 1) s = r"#COLUMNINFO= 7, m, Gecorrigeerde diepte, 11" v = utils.parse_quantity_number(s, 7) self.assertEqual(v, 11) h = {"COLUMNINFO": [["7", "m", "Gecorrigeerde diepte", "11"]]} v = utils.parse_quantity_number(h, 7) self.assertEqual(v, 11) s = r"#COLUMNINFO= 4, %, Wrijvingsgetal Rf, 4" v = utils.parse_quantity_number(s, 4) self.assertEqual(v, 4) h = {"COLUMNINFO": [["4", "%", "Wrijvingsgetal Rf", "4"]]} v = utils.parse_quantity_number(h, 4) self.assertEqual(v, 4) s = r"#COLUMNINFO= 4, Graden(deg), Helling, 8" v = utils.parse_quantity_number(s, 4) self.assertEqual(v, 8) h = {"COLUMNINFO": [["4", "Graden(deg)", "Helling", "8"]]} v = utils.parse_quantity_number(h, 4) self.assertEqual(v, 8)
def test_quantity_number(self): s = r"#COLUMNINFO= 1, m, Sondeerlengte, 1" v = utils.parse_quantity_number(s, 1) self.assertEqual(v, 1) s = r"#COLUMNINFO= 7, m, Gecorrigeerde diepte, 11" v = utils.parse_quantity_number(s, 7) self.assertEqual(v, 11) s = r"#COLUMNINFO= 4, %, Wrijvingsgetal Rf, 4" v = utils.parse_quantity_number(s, 4) self.assertEqual(v, 4) s = r"#COLUMNINFO= 4, Graden(deg), Helling, 8" v = utils.parse_quantity_number(s, 4) self.assertEqual(v, 8)