コード例 #1
0
ファイル: test_people_alive.py プロジェクト: jmieding/python
def test_identical_names():
  assert main(names_dates_2)[0:5] == [(1980, 3), (1981, 3), (1982, 3), (1983, 3), (1984, 3)]
  # if there are two or more people with the same name, program should count each individually, not person with the earlier list index position multiple times.
コード例 #2
0
ファイル: test_people_alive.py プロジェクト: jmieding/python
def test_top_five():
  assert main(names_dates_1)[0:5] == [(1967, 2), (1968, 2), (1969, 2), (1970, 2), (1971, 2)]