Python

pytest

Në shqip përdoret i njëjti emër.

ShpjegimiSQ

pytest-i është mjeti më i përdorur për të shkruar teste në Python. Shkruan funksione që fillojnë me test_ dhe përdor assert; me komandën pytest i ekzekuton të gjitha dhe sheh cilat kaluan.

EnglishEN

pytest is the most popular tool for writing tests in Python. You write functions starting with test_ and use assert; the pytest command runs them all and shows which passed.

Si ta mendosh

Si provat e shpejta para provimit: i kalon një nga një dhe e di menjëherë ku je mirë e ku jo.

Lexoje në anglisht

Like practice quizzes before an exam: you go through them one by one and instantly know where you're strong and where you're not.

Shembull kodipython

def mblidh(a, b):
    return a + b

def test_mblidh():
    assert mblidh(2, 3) == 5

Terma të lidhur