class TestMultipleAsserts(unittest.TestCase):

    def test_multipleasserts(self):
        with self.subTest():
            self.assertEqual(1, 0)
with self.subTest():
    self.assertEqual(2, 0)
How do I handle multiple asserts within a single Python unittest?