Getting Started With Testing in Python – Real Python
https://realpython.com/python-testing/
WebYou can write both integration tests and unit tests in Python. To write a unit test for the built-in function sum (), you would check the output of sum () against a known output. For example, here’s how you check that the sum () of the numbers (1, 2, 3) equals 6: Python. >>> assert sum([1, 2, 3]) == 6, "Should be 6".
DA: 92 PA: 72 MOZ Rank: 40