Open yeomko22 opened 2 years ago
# conftest.py
import pytest
@pytest.fixture def input_value(): return 4
- 그 외에 @pytest.mark.parametrize 데코레이터를 사용하면 배열을 인풋으로 쉽게 선언할 수 있다.
~~~python
# test_my_module.py
from my_module import square
def test_squre_gives_correct_value(input_value):
subject = square(input_value)
assert subject == 16
python convention
type hints