PyTest is a mature, feature-rich Python testing framework that makes writing tests simple and scalable.
Key differences from unittest:
assert
statements vs self.assertEqual()
# PyTest style
def test_addition():
assert 2 + 2 == 4
# unittest style
import unittest
class TestMath(unittest.TestCase):
def test_addition(self):
self.assertEqual(2 + 2, 4)