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
def test_VS_01(): '''Empty initialization.''' t = VS() assert t.vel is None assert t.pen is None assert t.format == 'VS;'
def test_VS_03(): '''Setting vel to None formats correctly.''' t = VS(1, 2) t.vel = None assert t.format == 'VS;'
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;'
def test_VS_02(): '''Initialize velocity.''' t = VS(1) assert t.vel == 1 assert t.pen is None assert t.format == 'VS1;'
def test_VS_03(): """Setting vel to None formats correctly.""" t = VS(1, 2) t.vel = None assert t.format == b"VS;"
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;"
def test_VS_02(): """Initialize velocity.""" t = VS(1) assert t.vel == 1 assert t.pen is None assert t.format == b"VS1;"
def test_VS_01(): """Empty initialization.""" t = VS() assert t.vel is None assert t.pen is None assert t.format == b"VS;"
def test_VS_03( ): '''Setting vel to None formats correctly.''' t = VS(1, 2) t.vel = None assert t.format == 'VS;'