def testAccess(self): v=Dimension(1,0,-1,0,0,0,0) self.assertEqual(v[2],-1) v[0]=-3 self.assertEqual(v,Dimension(-3,0,-1,0,0,0,0))
def testCompare(self): v=Dimension(1,0,-1,0,0,0,0) self.assertEqual(v,Dimension(1,0,-1,0,0,0,0)) self.assertEqual(v==None,False)
def testCompareMixed(self): v = Dimension("m s^-1") self.assertEqual(v, Dimension("m s^-1")) self.assertEqual(v == None, False)
def testString(self): v=Dimension(1,0,-1,0,0,0,0) self.assertEqual(str(v),'[ 1 0 -1 0 0 0 0 ]')
def testStringSymbolic(self): v = Dimension("m s^-1") self.assertEqual(str(v), '[ m s^-1 ]')