Example #1
0
def test_non_zero_polygon_zero_area_with_warning(capfd):
    result = ObjectAreaEvaluator.non_zero_polygon(kZeroAreaPolygon,
                                                  suppress_warning=False)
    out, err = capfd.readouterr()
    assert round(result.area, 3) == 1.005
    assert result.bounds == (0.95, 0.95, 11.05, 1.05)
    assert len(err) > 0
Example #2
0
def test_non_zero_polygon_nonzero_area():
    result = ObjectAreaEvaluator.non_zero_polygon(kNonZeroAreaPolygon)
    assert round(result.area, 3) == 100.0
    assert result.bounds == (1.0, 1.0, 11.0, 11.0)
Example #3
0
def test_non_zero_polygon_nonzero_area():
	result = ObjectAreaEvaluator.non_zero_polygon(kNonZeroAreaPolygon)
	assert round(result.area, 3) == 100.0
	assert result.bounds == (1.0, 1.0, 11.0, 11.0)
Example #4
0
def test_non_zero_polygon_zero_area_with_warning(capfd):
	result = ObjectAreaEvaluator.non_zero_polygon(kZeroAreaPolygon, suppress_warning=False)
	out, err = capfd.readouterr()
	assert round(result.area, 3) == 1.005
	assert result.bounds == (0.95, 0.95, 11.05, 1.05)
	assert len(err) > 0