| 879 | |
| 880 | # TODO Revise test output, write expanded unittest |
| 881 | def _dump(): # htest # (not really, but ignore in coverage) |
| 882 | from zlib import crc32 |
| 883 | line, crc = 0, 0 |
| 884 | |
| 885 | def sprint(obj): |
| 886 | nonlocal line, crc |
| 887 | txt = str(obj) |
| 888 | line += 1 |
| 889 | crc = crc32(txt.encode(encoding='utf-8'), crc) |
| 890 | print(txt) |
| 891 | #print('***', line, crc, '***') # Uncomment for diagnosis. |
| 892 | |
| 893 | def dumpCfg(cfg): |
| 894 | print('\n', cfg, '\n') # Cfg has variable '0xnnnnnnnn' address. |
| 895 | for key in sorted(cfg): |
| 896 | sections = cfg[key].sections() |
| 897 | sprint(key) |
| 898 | sprint(sections) |
| 899 | for section in sections: |
| 900 | options = cfg[key].options(section) |
| 901 | sprint(section) |
| 902 | sprint(options) |
| 903 | for option in options: |
| 904 | sprint(option + ' = ' + cfg[key].Get(section, option)) |
| 905 | |
| 906 | dumpCfg(idleConf.defaultCfg) |
| 907 | dumpCfg(idleConf.userCfg) |
| 908 | print('\nlines = ', line, ', crc = ', crc, sep='') |
| 909 | |
| 910 | |
| 911 | if __name__ == '__main__': |