Esempio n. 1
0
def test_contiguous_with_contiguity_flips_is_true(
        contiguous_partition_with_flips):
    contiguous_partition, test_flips = contiguous_partition_with_flips
    contiguous_partition2 = contiguous_partition.flip(test_flips)
    assert contiguous(contiguous_partition2)
    assert single_flip_contiguous(contiguous_partition2)
    assert contiguous_bfs(contiguous_partition2)
Esempio n. 2
0
def test_discontiguous_with_contiguous_bfs_flips_is_false(
    discontiguous_partition_with_flips
):
    part, test_flips = discontiguous_partition_with_flips
    discontiguous_partition2 = part.flip(test_flips)
    assert not contiguous_bfs(discontiguous_partition2)
Esempio n. 3
0
def test_discontiguous_with_contiguous_bfs_no_flips_is_false(discontiguous_partition):
    assert not contiguous_bfs(discontiguous_partition)
Esempio n. 4
0
def test_contiguous_with_contiguity_no_flips_is_true(contiguous_partition):
    assert contiguous(contiguous_partition)
    assert single_flip_contiguous(contiguous_partition)
    assert contiguous_bfs(contiguous_partition)
Esempio n. 5
0
def test_discontiguous_with_contiguous_bfs_flips_is_false(
        discontiguous_partition):
    discontiguous_partition2 = discontiguous_partition.flip(
        discontiguous_partition.test_flips)
    assert not contiguous_bfs(discontiguous_partition2)
Esempio n. 6
0
def test_contiguous_with_contiguity_flips_is_true(contiguous_partition):
    contiguous_partition2 = contiguous_partition.merge(
        contiguous_partition.test_flips)
    assert contiguous(contiguous_partition2)
    assert single_flip_contiguous(contiguous_partition2)
    assert contiguous_bfs(contiguous_partition2)