menu_book Course Curriculum (Software Testing) expand_more
Testing Fundamentals
Assertions & Fixtures
Test Doubles & Dependencies
Coverage & Quality
API & Web Testing
branch coverage
Learn branch coverage in Software Testing with a dedicated explanation, a concept-specific example, practical cautions, and a mastery check.
12 min read
•
Intermediate
Advertisement
software-testing-026.py
python
def shipping(total): return 0 if total>=100 else 10
def test_both_branches():
assert shipping(150)==0
assert shipping(50)==10
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content