Skip to content

Commit ec84a2e

Browse files
committed
#406 - Use the readlines(False) to normalize the testing files.
1 parent 0532346 commit ec84a2e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/test_attrib.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,11 @@ def test_lic_key_name_sync(self):
118118
errors, abouts = model.collect_inventory(test_file)
119119
attrib.generate_and_save(abouts, output_file, template_loc)
120120

121-
f1 = open(output_file, "r").read().replace(" ", "").strip('\n').strip('\t')
122-
f2 = open(expected,"r").read().replace(" ", "").strip('\n').strip('\t')
121+
with open(output_file) as of:
122+
f1 = '\n'.join(of.readlines(False))
123+
with open(expected) as ef:
124+
f2 = '\n'.join(ef.readlines(False))
125+
123126
assert f1 == f2
124127

125128
def remove_timestamp(html_text):

0 commit comments

Comments
 (0)