<aside>
</aside>
@pytest.mark.parametrize
๋ฐ์ฝ๋ ์ดํฐ๋ก ํ
์คํธ ํจ์ ํ๋ผ๋ฏธํฐํ ๋ฐฉ๋ฒ ์ดํด ๋ฐ ์ ์ฉargnames
, argvalues
) ์ดํด, ๋จ์ผ/๋ค์ค ํ๋ผ๋ฏธํฐ ์์ ์์ฑํ๋ก์ ํธ ๊ตฌ์กฐ: (๋ณ๋ ์์)
graph TD
A(my-pytest-project) --> B(.venv);
A --> C(mycalc);
A --> D(tests);
C --> C1(__init__.py);
C --> C2(calculator.py);
D --> D1(__init__.py);
D --> D2(test_calculator.py ์ฌ๊ธฐ์ ํ๋ผ๋ฏธํฐํ ํ
์คํธ ์ถ๊ฐ);
D --> D3(conftest.py);
D --> D4(test_scopes.py);
style B fill:#eee,stroke:#333,stroke-dasharray: 5 5;
style C fill:#ccf,stroke:#333;
style D fill:#cfc,stroke:#333;
style C2 fill:#cce,stroke:#333;
style D2 fill:#cef,stroke:#333;
style D3 fill:#fec,stroke:#333;
style D4 fill:#dff,stroke:#333;
mycalc/calculator.py
: (๋ณ๋ ์์)tests/test_calculator.py
(ํ๋ผ๋ฏธํฐํ ์ ์ฉ ์ - ๋ฌธ์ ์ ):tests/test_calculator.py
(ํ๋ผ๋ฏธํฐํ ์ ์ฉ ํ - ๊ฐ์ !):-v
์ฌ์ฉ):