When working with Regex and PyParsing, I find it imperative to maintain unit tests on everything small because I am dealing with over 2,400 abstract keyword combination built out of some 423 EBNF syntax of ISC Bind9 named.conf configuration file and all in Python.
Tiny mistakes that I make are caught early on, and development gets a solid foundation in which to build the proper abstract syntax tree.
Oh, test code is about 1/4th the size of the original source code, line-wise, but it has 100% coverage on syntax linkage (and not necessarily 100% data value validation due to dependency on other field settings).
Comments
When working with Regex and PyParsing, I find it imperative to maintain unit tests on everything small because I am dealing with over 2,400 abstract keyword combination built out of some 423 EBNF syntax of ISC Bind9 named.conf configuration file and all in Python.
Tiny mistakes that I make are caught early on, and development gets a solid foundation in which to build the proper abstract syntax tree.
Oh, test code is about 1/4th the size of the original source code, line-wise, but it has 100% coverage on syntax linkage (and not necessarily 100% data value validation due to dependency on other field settings).
source: https://github.com/egberts/bind9_parser