File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212import time
1313
1414from email .mime .text import MIMEText
15+ from email .mime .multipart import MIMEMultipart
1516
1617TIME = time .strftime ("%H:%M:%S %d-%m-%Y" , time .gmtime ())
1718
3839 parse = failed_test [3 ] if failed_test [3 ] else None
3940 output_folder = failed_test [4 ]
4041 traceback = False if failed_test [5 ] == "False" else bool (failed_test [5 ])
41- detection = True if failed_test [6 ] else False
42+ detection = False if failed_test [6 ] == " False" else bool ( failed_test [ 5 ])
4243
4344 TEST_COUNTS .append (test_count )
4445
7475
7576if CONTENT :
7677 SUBJECT += " (%s)" % ", " .join ("#%d" % count for count in TEST_COUNTS )
77- msg = MIMEText ( CONTENT )
78+ msg = MIMEMultipart ( )
7879 msg ["Subject" ] = SUBJECT
7980 msg ["From" ] = FROM
8081 msg ["To" ] = TO
8182
83+ msg .attach (MIMEText (CONTENT ))
84+
8285 for test_count , attachment in ATTACHMENTS .items ():
8386 attachment = MIMEText (attachment )
8487 attachment .add_header ('Content-Disposition' , 'attachment' , filename = "test_case_%d_console_output.txt" % test_count )
You can’t perform that action at this time.
0 commit comments