Skip to content
This repository was archived by the owner on Jun 27, 2018. It is now read-only.

Commit 847e2c7

Browse files
committed
printing pass/fail info at end of test
1 parent 75ed39d commit 847e2c7

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

pyretic/tests/test_bucket.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,15 @@ def close_fds(fds, fd_str):
236236

237237
def write_passfail_info(success_file, tshark_counts, buckets_counts):
238238
passfail = open(success_file, 'w')
239+
output_str = ''
239240
if tshark_counts == buckets_counts:
240-
passfail.write("PASS\n")
241+
output_str += "PASS\n"
241242
else:
242-
passfail.write("FAIL\n")
243-
passfail.write("TShark: %s\n" % str(tshark_counts))
244-
passfail.write("Bucket: %s\n" % str(buckets_counts))
243+
output_str += "FAIL\n"
244+
output_str += "TShark: %s\n" % str(tshark_counts)
245+
output_str += "Bucket: %s\n" % str(buckets_counts)
246+
print output_str
247+
passfail.write(output_str)
245248
passfail.close()
246249

247250
### Helpers to extract specific headers from tshark output ###

0 commit comments

Comments
 (0)