Пример #1
0
def test_validate_region_negative():
    '''Ensure negative region is invalidated.'''

    assert not validate_region_bounds((0, -1), (2, 2), (6, 6))
Пример #2
0
def test_validate_region_empty():
    '''Ensure empty region is invalidated.'''

    assert not validate_region_bounds((0, 0), (0, 0), (6, 6))
Пример #3
0
def test_validate_region_within():
    '''Ensure partial region is validated.'''

    assert validate_region_bounds((1, 0), (2, 2), (6, 6))
Пример #4
0
def test_validate_region_exceeds():
    '''Ensure excessively large region is invalidated.'''

    assert not validate_region_bounds((1, 0), (6, 6), (6, 6))
Пример #5
0
def test_validate_region_whole():
    '''Ensure full region is validated.'''

    assert validate_region_bounds((0, 0), (6, 6), (6, 6))