Разработка программного обеспечения с GitHub Copilot
Thalia Barrera
AI Engineering Curriculum Manager, DataCamp


def calculate_discount(price, discount_pct):
discount = price * (discount_pct / 100)
return price - discount
calculate_discount(50, 20) # → 40.0 ✓
А что насчёт...
pricediscount_pct > 100[screencast]
[screencast]

Простые случаи
/tests
Особые случаи
Write pytest unit tests for calculate_discount covering: negative price, discount > 100%, and empty item list. Use parametrize for edge cases.

/tests или простой запрос
#file:/fixTestFailure при падении теста
Write integration tests for the checkout flow. Use
#file:cart.pyand#file:payment.py. Mock the payment gateway and assert that order status updates correctly.
@workspace автоматически находит нужный код#terminalLastCommand для отладки сбоев
@workspaceWrite Playwright end-to-end tests for the user registration flow. Assert that the confirmation email is triggered.
[screencast]
Разработка программного обеспечения с GitHub Copilot