Пример #1
0
def test_rule_init_3x3_creates_input_rotated_270():
    r = Rule(test_3x3_row)
    expected_input = [['.', '#', '#'], ['#', '.', '#'], ['.', '.', '#']]
    assert expected_input in r.inputs
Пример #2
0
def test_rule_init_3x3_creates_input_flipped_vertically():
    r = Rule(test_3x3_row)
    expected_input = [['#', '#', '#'], ['.', '.', '#'], ['.', '#', '.']]
    assert expected_input in r.inputs
Пример #3
0
def test_rule_init_2x2_creates_output():
    r = Rule(test_2x2_row)
    assert r.output == [['#', '#', '.'], ['#', '.', '.'], ['.', '.', '.']]
Пример #4
0
def test_rule_init_2x2_creates_input_rotated_180():
    r = Rule(test_2x2_row)
    expected_input = [['#', '.'], ['.', '.']]
    assert expected_input in r.inputs
Пример #5
0
def test_rule_init_2x2_creates_input_flipped_horizontally():
    r = Rule(test_2x2_row)
    expected_input = [['.', '.'], ['#', '.']]
    assert expected_input in r.inputs
Пример #6
0
def test_rule_init_2x2_creates_first_input():
    r = Rule(test_2x2_row)
    expected_input = [['.', '.'], ['.', '#']]
    assert expected_input in r.inputs