ENع
الدرس 26 · Idiomatic Python

Testing with pytest

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

A test is a small function that calls your code and checks the answer with assert. pytest is the tool that finds those functions, runs each one and reports what happened. Follow one run of test_area.py: one test passes by luck, the other fails, pytest's report points straight at a typo, and after the fix both tests pass.

14 دقيقة11 خطوات5 أسئلةAdvanced
شكل 26 · تفاعلي
جارٍ تحميل الرسم…
أو ← →

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