ENع
الدرس 37 · Tools of the trade

Unit testing

لم يُترجم بعد؛ يُعرض باللغة الإنجليزية

A unit test runs one small piece of code with input whose right answer you already know, and checks the output with an assertion. Follow test_add as it calls add(2, 3), see pytest run every test in a second, catch a broken change straight away, and grow the code test-first: red, green, refactor.

10 دقيقة12 خطوات5 أسئلةIntermediate
شكل 37 · تفاعلي
جارٍ تحميل الرسم…
أو ← →

اختبار يتاح بعد الخطوة الأخيرة.