Úvod do testování v Pythonu
Alexander Levin
Data Scientist
Integrační testování – metoda testování softwaru ověřující, zda interakce funguje správně.
Integrace – interakce mezi 2 nebo více moduly v systému.

Příklady:
Možné problémy s integrací:
import pytest, os
@pytest.fixture
def setup_file():
# Create temporary file
file = "test_file.txt"
with open(file, "w") as f1:
f1.write("Test data 1")
yield file
os.remove(file)
def test_fs(setup_file):
file = setup_file
# Check that the file was created successfully
assert os.path.exists(file)
Integrační testování – metoda testování softwaru; ověřuje, zda integrace funguje správně.
Reálné projekty zahrnují mnoho různých integrací.
Integrační testování pomáhá předcházet mnoha potenciálním problémům.
Příklad: ověření integrace mezi Pythonem a souborovým systémem.
Úvod do testování v Pythonu