コード例 #1
0
ファイル: matching_tests.py プロジェクト: kpolimis/grantsbot
def test_choose_zero_ideas():
    assert choose_ideas(['a'], 0) == []
コード例 #2
0
ファイル: matching_tests.py プロジェクト: kpolimis/grantsbot
def test_choose_ideas_more_ideas_than_number():
    result = choose_ideas(['a', 'b', 'c'], 2)
    possible_results = [['a', 'b'], ['a', 'c'], ['b', 'c'],
                        ['b', 'a'], ['c', 'a'], ['c', 'b']]
    assert result in possible_results
コード例 #3
0
ファイル: matching_tests.py プロジェクト: kpolimis/grantsbot
def test_choose_ideas_same_ideas_as_number():
    result = choose_ideas(['a', 'b'], 2)
    assert result in [['a', 'b'], ['b', 'a']]
コード例 #4
0
ファイル: matching_tests.py プロジェクト: kpolimis/grantsbot
def test_choose_ideas_negative_number():
    assert choose_ideas(['a'], -1) == ['a']
コード例 #5
0
ファイル: matching_tests.py プロジェクト: kpolimis/grantsbot
def test_choose_ideas_fewer_ideas_than_number():
    assert choose_ideas(['a'], 2) == ['a']
コード例 #6
0
ファイル: matching_tests.py プロジェクト: kpolimis/grantsbot
def test_choose_ideas_no_ideas():
    assert choose_ideas([], 3) == []