Python 3.13: Replace deprecated makeSuite() (#65)

The function has been deprecated in Python 3.11 and is no longer
available in Python 3.13.
This commit is contained in:
Sandro
2024-10-14 20:36:04 +02:00
committed by GitHub
parent 4a8018c2de
commit 6eedaf7717
6 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -71,7 +71,7 @@ class MimeTestCase(unittest.TestCase):
self.fail('should get boundary error parsing bad rfc822 attachment')
except errors.BoundaryError:
pass
def testDefang(self,vname='virus1',part=1,
fname='LOVE-LETTER-FOR-YOU.TXT.vbs'):
try:
@@ -234,7 +234,7 @@ class MimeTestCase(unittest.TestCase):
#print(msg + filter.msg)
self.assertTrue(result.getvalue() == msg + filter.msg)
def suite(): return unittest.makeSuite(MimeTestCase,'test')
def suite(): return unittest.TestLoader().loadTestsFromTestCase(MimeTestCase)
if __name__ == '__main__':
if len(sys.argv) < 2: