def test_metaquantity_compatible_family_change(self):
        mq = MetaQuantity(name='vp', units='km/s', family_name='pvelocity')

        mq.name = 'vs'
        mq.family_name = 'svelocity'
        self.assertEqual(mq.name, 'vs')
        self.assertEqual(mq.units.label, 'km/s')
        self.assertEqual(mq.family_name, 'svelocity')
        return
Пример #2
0
    def test_metaquantity_incompatible_family_change(self):
        mq = MetaQuantity(name='vp', units='km/s', family_name='pvelocity')

        mq.family_name = 'time'

        self.failUnlessEqual(mq.name, 'vp')
        self.failUnlessEqual(mq.units.label, 'msec')
        self.failUnlessEqual(mq.family_name, 'time')
        return
Пример #3
0
    def test_metaquantity_incompatible_family_change(self):
        mq = MetaQuantity( name='vp', units='km/s', family_name='pvelocity')

        mq.family_name = 'time'

        self.failUnlessEqual( mq.name, 'vp' )
        self.failUnlessEqual( mq.units.label, 'msec' )
        self.failUnlessEqual( mq.family_name, 'time' )
        return