- Updated test_dns.py to enhance mock function definitions and improve spacing for better readability. - Modified test_filters.py to streamline assertions and ensure consistent formatting across test cases. - Cleaned up test_import_export.py by organizing imports and ensuring consistent formatting in CSV and JSON tests. - Improved test_main.py by refining mock setups and ensuring consistent error handling in assertions.
426 B
426 B
Normalize hosts-file serialization
The parser models Host Entries plus header and footer comments rather than the file's exact byte layout. Serialization deliberately aligns fields, groups comments, omits original blank-line placement, and ensures the management header is present. This trades lossless round trips for a stable, readable output; code and documentation must not promise preservation of original formatting.