Esempio n. 1
0
 def _subcommands(self):
     result = [SP(self.number)]
     if self.acceleration:
         result.append(AS(self.acceleration, self.number))
     if self.force:
         result.append(FS(self.force, self.number))
     if self.velocity:
         result.append(VS(self.velocity, self.number))
     if self.thickness:
         result.append(PT(self.thickness))
     return result
Esempio n. 2
0
def test_VS_01():
    '''Empty initialization.'''
    t = VS()
    assert t.vel is None
    assert t.pen is None
    assert t.format == 'VS;'
Esempio n. 3
0
def test_VS_03():
    '''Setting vel to None formats correctly.'''
    t = VS(1, 2)
    t.vel = None
    assert t.format == 'VS;'
Esempio n. 4
0
def test_VS_03():
    '''Initialize velocity and pen.'''
    t = VS(1, 2)
    assert t.vel == 1
    assert t.pen == 2
    assert t.format == 'VS1,2;'
Esempio n. 5
0
def test_VS_02():
    '''Initialize velocity.'''
    t = VS(1)
    assert t.vel == 1
    assert t.pen is None
    assert t.format == 'VS1;'
Esempio n. 6
0
def test_VS_03():
    """Setting vel to None formats correctly."""
    t = VS(1, 2)
    t.vel = None
    assert t.format == b"VS;"
Esempio n. 7
0
def test_VS_03():
    """Initialize velocity and pen."""
    t = VS(1, 2)
    assert t.vel == 1
    assert t.pen == 2
    assert t.format == b"VS1,2;"
Esempio n. 8
0
def test_VS_02():
    """Initialize velocity."""
    t = VS(1)
    assert t.vel == 1
    assert t.pen is None
    assert t.format == b"VS1;"
Esempio n. 9
0
def test_VS_01():
    """Empty initialization."""
    t = VS()
    assert t.vel is None
    assert t.pen is None
    assert t.format == b"VS;"
Esempio n. 10
0
def test_VS_03( ):
    '''Setting vel to None formats correctly.'''
    t = VS(1, 2)
    t.vel = None
    assert t.format == 'VS;'