Exemplo 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
Exemplo n.º 2
0
def test_FS_01():
    '''Empty initialization.'''
    t = FS()
    assert t.force is None
    assert t.pen is None
    assert t.format == 'FS;'
Exemplo n.º 3
0
def test_FS_03():
    '''Setting force to None formats correctly.'''
    t = FS(1, 2)
    t.force = None
    assert t.format == 'FS;'
Exemplo n.º 4
0
def test_FS_03():
    '''Initialize forceocity and pen.'''
    t = FS(1, 2)
    assert t.force == 1
    assert t.pen == 2
    assert t.format == 'FS1,2;'
Exemplo n.º 5
0
def test_FS_02():
    '''Initialize forceocity.'''
    t = FS(1)
    assert t.force == 1
    assert t.pen is None
    assert t.format == 'FS1;'
Exemplo n.º 6
0
def test_FS_03():
    """Setting force to None formats correctly."""
    t = FS(1, 2)
    t.force = None
    assert t.format == b"FS;"
Exemplo n.º 7
0
def test_FS_03():
    """Initialize forceocity and pen."""
    t = FS(1, 2)
    assert t.force == 1
    assert t.pen == 2
    assert t.format == b"FS1,2;"
Exemplo n.º 8
0
def test_FS_02():
    """Initialize forceocity."""
    t = FS(1)
    assert t.force == 1
    assert t.pen is None
    assert t.format == b"FS1;"
Exemplo n.º 9
0
def test_FS_01():
    """Empty initialization."""
    t = FS()
    assert t.force is None
    assert t.pen is None
    assert t.format == b"FS;"