Desarrollo de software con 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 ✓
¿Pero qué pasa con...
price negativodiscount_pct > 100[screencast]
[screencast]

Casos simples
/tests
Casos especiales
Write pytest unit tests for calculate_discount covering: negative price, discount > 100%, and empty item list. Use parametrize for edge cases.

/tests o un prompt simple
#file:/fixTestFailure si falla una prueba
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 descubre código relevante automáticamente#terminalLastCommand para depurar fallos
@workspaceWrite Playwright end-to-end tests for the user registration flow. Assert that the confirmation email is triggered.
[screencast]
Desarrollo de software con GitHub Copilot