예제 #1
0
def test_scale_RR():
    """Scale works on single RR."""
    t = RR((1, 2))
    scale(t, 1.5)
    assert t.xy == Coordinate(1.5, 3.0)
예제 #2
0
def test_scale_list_01():
    t = [PA([(1, 2)]), PU([(3, 4)])]
    scale(t, 1.5)
    assert t[0].xy == CoordinateArray([(1.5, 3)])
    assert t[1].xy == CoordinateArray([(4.5, 6)])
예제 #3
0
def test_scale_EA():
    """Scale works on single EA."""
    t = EA((1, 2))
    scale(t, 1.5)
    assert t.xy == Coordinate(1.5, 3.0)
예제 #4
0
def test_scale_PR():
    """Scale works on single PR."""
    t = PR([(1, 2)])
    scale(t, 1.5)
    assert t.xy == CoordinateArray([(1.5, 3.0)])
예제 #5
0
def test_scale_list_01( ):
    t = [PA([(1, 2)]), PU([(3, 4)])]
    scale(t, 1.5)
    assert t[0].xy == CoordinateArray([(1.5, 3)])
    assert t[1].xy == CoordinateArray([(4.5, 6)])
예제 #6
0
def test_scale_CI():
    """Scale works on single CI."""
    t = CI(1, 20)
    scale(t, 1.5)
    assert t.radius == 1.5
    assert t.chordangle == 20  ### chordangle is unmodified
예제 #7
0
def test_scale_PR( ):
    '''Scale works on single PR.'''
    t = PR([(1, 2)])
    scale(t, 1.5)
    assert t.xy == CoordinateArray([(1.5, 3.0)])
예제 #8
0
def test_scale_RR( ):
    '''Scale works on single RR.'''
    t = RR((1, 2))
    scale(t, 1.5)
    assert t.xy == Coordinate(1.5, 3.0)
예제 #9
0
def test_scale_CI( ):
    '''Scale works on single CI.'''
    t = CI(1, 20)
    scale(t, 1.5)
    assert t.radius == 1.5
    assert t.chordangle == 20 ### chordangle is unmodified
예제 #10
0
def test_scale_EA( ):
    '''Scale works on single EA.'''
    t = EA((1, 2))
    scale(t, 1.5)
    assert t.xy == Coordinate(1.5, 3.0)
예제 #11
0
def test_scale_RA():
    '''Scale works on single RA.'''
    t = RA((1, 2))
    scale(t, 1.5)
    assert t.xy == Coordinate(1.5, 3.0)
예제 #12
0
def test_scale_PA():
    '''Scale works on single PA.'''
    t = PA([(1, 2)])
    scale(t, 1.5)
    assert t.xy == CoordinateArray([(1.5, 3.0)])
예제 #13
0
def test_scale_ER():
    '''Scale works on single ER.'''
    t = ER((1, 2))
    scale(t, 1.5)
    assert t.xy == Coordinate(1.5, 3.0)