menu_book Course Curriculum (Software Testing) expand_more
Testing Fundamentals
Assertions & Fixtures
Test Doubles & Dependencies
Coverage & Quality
API & Web Testing
test naming conventions
Learn test naming conventions in Software Testing with a dedicated explanation, a concept-specific example, practical cautions, and a mastery check.
12 min read
•
Intermediate
Advertisement
software-testing-029.py
python
def test_discount_returns_zero_when_cart_is_empty():
cart=[]
discount=0 if not cart else 5
assert discount==0
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content