Exemplo n.º 1
0
def test_measure():
    image = data.camera()
    viewer = ImageViewer(image)
    m = Measure()
    viewer += m

    m.line_changed([(0, 0), (10, 10)])
    assert_equal(str(m._length.text), '14.1')
    assert_equal(str(m._angle.text[:5]), '135.0')
Exemplo n.º 2
0
def test_measure():
    image = data.camera()
    viewer = ImageViewer(image)
    m = Measure()
    viewer += m

    m.line_changed([(0, 0), (10, 10)])
    assert_equal(str(m._length.text), '14.1')
    assert_equal(str(m._angle.text[:5]), '135.0')