Created
August 18, 2017 07:01
-
-
Save cocodrips/d4528f4feb6dd78c6d6ebc0829d6b4ef to your computer and use it in GitHub Desktop.
pytestのparametrizeで遊ぶ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
日付や年月に関する処理 | |
""" | |
import pytest | |
@pytest.mark.parametrize('nengo,year,seireki', [ | |
('平成', 29, 2017), | |
('昭和', 63, 1988) | |
]) | |
def test_nengo_to_seireki(nengo, year, seireki): | |
target = util.date.nengo_to_seireki(nengo, year) | |
assert target == seireki |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment