unittest

Zunbeltz Izaola zunbeltz at wm.lc.ehu.es.XXX
Mon Jan 26 04:20:06 EST 2004


Hi,

I am using unittest for the first time. I have read chapter 7 of dive into
pyhton (Unit Test). I have the following code 

from spacegroup import *
import pygroups.misc.matrix as matrix
import unittest

class KnowValues(unittest.TestCase):

    KnownRotationMatrices = [
        ((Rotational3Part([[-1,0,0],[0,1,0],[0,0,-1]])),
        (1, -1, 2, matrix.vector([0,1,0])))
        ]

    def TestRotationalPartdeterminant(self):
        """ RotationalPart. determinant with known values."""
        for i in  self.KnownRotationMatrices:
            det = i[0].determinant()
            self.assertEqual(det,i[1][0])


if __name__ == "__main__":
   unittest.main()

but when i run this scrip i get the following output


----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK

Why the test didn't run? any idea?

TIA 

Zunbeltz



More information about the Python-list mailing list