>>> from solargen import solargen_write >>> sgL = [('gC', 3.833, 46.0, 12), ('gB', 3.408, 40.9, 12), ('gA', 3.993, 55.9, 14)] >>> out_lines = [ ... 'gC;3.833;46.0;12', ... 'gB;3.408;40.9;12', ... 'gA;3.993;55.9;14', ... ] >>> n = solargen_write(sgL, 'out.txt') >>> lout = [] >>> with open('out.txt', 'r') as f: ... for lin in f: ... lout.append(lin.strip()) >>> if n == 3 and lout == out_lines: ... True ... else: ... print(out_lines) ... print(lout) True >>> import os >>> os.remove('out.txt')