예제 #1
0
def test_subsets():
    assert subsets(1) == [[1]]
    assert subsets(4) == [[1, 0, 0, 0], [0, 1, 0, 0], [1, 1, 0,
                                                       0], [0, 0, 1, 0],
                          [1, 0, 1, 0], [0, 1, 1, 0], [1, 1, 1,
                                                       0], [0, 0, 0, 1],
                          [1, 0, 0, 1], [0, 1, 0, 1], [1, 1, 0,
                                                       1], [0, 0, 1, 1],
                          [1, 0, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1]]
예제 #2
0
def test_subsets():
    assert subsets(1) == [[1]]
    assert subsets(4) == [
      [1, 0, 0, 0], [0, 1, 0, 0], [1, 1, 0, 0], [0, 0, 1, 0], [1, 0, 1, 0],
      [0, 1, 1, 0], [1, 1, 1, 0], [0, 0, 0, 1], [1, 0, 0, 1], [0, 1, 0, 1],
      [1, 1, 0, 1], [0, 0, 1, 1], [1, 0, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1]]