(groups)
| 123 | regex = r"\[(?P<num>.*)\] \[(?P<val>.*)\] \[(?P<date>.*)\]" |
| 124 | |
| 125 | def caster(groups): |
| 126 | groups["num"] = int(groups["num"]) |
| 127 | groups["val"] = float(groups["val"]) |
| 128 | groups["date"] = datetime.strptime(groups["date"], "%Y-%m-%d %H:%M:%S") |
| 129 | |
| 130 | result = next(logger.parse(file, regex, cast=caster)) |
| 131 | assert result == dict(num=123, val=1.1, date=datetime(2017, 3, 29, 11, 11, 11)) |
nothing calls this directly
no outgoing calls
no test coverage detected