Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -------------- tasks/escher_tasks/task_9__treasures.py ----------------
- def treasures(info, limit):
- return []
- # ---------------- tests/test_escher_tasks/test_task_9__treasures.py ------------------
- from tasks.escher_tasks.task_9__treasures import treasures
- def test_treasures():
- assert treasures(
- {'golden coin': {'price': 100, 'weight': 50, 'amount': 200},
- 'silver coin': {'price': 10, 'weight': 20, 'amount': 1000},
- 'ruby': {'price': 1000, 'weight': 200, 'amount': 2}}, 5
- ) == ['golden coin: 92', 'ruby: 2']
- assert treasures(
- {'golden coin': {'price': 100, 'weight': 50, 'amount': 100},
- 'silver coin': {'price': 10, 'weight': 20, 'amount': 100},
- 'ruby': {'price': 1000, 'weight': 200, 'amount': 1}}, 7.5
- ) == ['golden coin: 100', 'silver coin: 100', 'ruby: 1']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement