コード例 #1
0
ファイル: test_iterables.py プロジェクト: cosmosZhou/sagemath
def test__partition():
    assert _partition('abcde', [1, 0, 1, 2, 0]) == [['b', 'e'], ['a', 'c'],
                                                    ['d']]
    assert _partition('abcde', [1, 0, 1, 2, 0], 3) == [['b', 'e'], ['a', 'c'],
                                                       ['d']]
    output = (3, [1, 0, 1, 2, 0])
    assert _partition('abcde', *output) == [['b', 'e'], ['a', 'c'], ['d']]
コード例 #2
0
ファイル: test_iterables.py プロジェクト: Acebulf/sympy
def test__partition():
    assert _partition('abcde', [1, 0, 1, 2, 0]) == [
        ['b', 'e'], ['a', 'c'], ['d']]
    assert _partition('abcde', [1, 0, 1, 2, 0], 3) == [
        ['b', 'e'], ['a', 'c'], ['d']]
    output = (3, [1, 0, 1, 2, 0])
    assert _partition('abcde', *output) == [['b', 'e'], ['a', 'c'], ['d']]
コード例 #3
0
ファイル: test_iterables.py プロジェクト: rae1/sympy
def test__partition():
    assert _partition("abcde", [1, 0, 1, 2, 0]) == [["b", "e"], ["a", "c"], ["d"]]
    assert _partition("abcde", [1, 0, 1, 2, 0], 3) == [["b", "e"], ["a", "c"], ["d"]]
    output = (3, [1, 0, 1, 2, 0])
    assert _partition("abcde", *output) == [["b", "e"], ["a", "c"], ["d"]]
コード例 #4
0
ファイル: test_iterables.py プロジェクト: msgoff/sympy
def test__partition():
    assert _partition("abcde", [1, 0, 1, 2, 0]) == [["b", "e"], ["a", "c"], ["d"]]
    assert _partition("abcde", [1, 0, 1, 2, 0], 3) == [["b", "e"], ["a", "c"], ["d"]]
    output = (3, [1, 0, 1, 2, 0])
    assert _partition("abcde", *output) == [["b", "e"], ["a", "c"], ["d"]]