Z
Zunbeltz Izaola
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
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