コード例 #1
0
 def test_reset_values(self):
     """reset            -- points equal input values after reset"""
     nc = Ncoords(self.random_points, tolist=1)
     nc.reset()  ### tested call ###
     result = nc.getResultCoords()
     # compare input and output point lists
     self.assertEqual(self.random_points, result)
コード例 #2
0
ファイル: ncoordstest.py プロジェクト: 8848/Pymol-script-repo
 def test_reset_values(self):
     """reset            -- points equal input values after reset"""
     nc = Ncoords( self.random_points, tolist=1)
     nc.reset() ### tested call ###
     result = nc.getResultCoords()
     # compare input and output point lists
     self.assertEqual( self.random_points, result)
コード例 #3
0
 def test_getResultCoords_type(self):
     """getResultCoords  -- if not tolist: return nx4 Numeric.array"""
     n = len(self.random_points)
     nc = Ncoords(self.random_points, tolist=1)
     nc.tolist = 0
     result = nc.getResultCoords()  ### tested call ###
     # confirm shape
     self.assertEqual((n, 4), Numeric.shape(result))
     # confirm type
     self.assertEqual(type(Numeric.array([])), type(result))
コード例 #4
0
 def test_getResultCoords_shape(self):
     """getResultCoords  -- if tolist: return nx3 ListType"""
     n = len(self.random_points)
     nc = Ncoords(self.random_points, tolist=0)
     nc.tolist = 1
     result = nc.getResultCoords()  ### tested call ###
     # confirm shape
     self.assertEqual((n, 3), Numeric.shape(result))
     # confirm type
     self.assertEqual(type([]), type(result))
コード例 #5
0
ファイル: ncoordstest.py プロジェクト: 8848/Pymol-script-repo
 def test_getResultCoords_type(self):
     """getResultCoords  -- if not tolist: return nx4 Numeric.array"""
     n = len(self.random_points)
     nc = Ncoords(self.random_points, tolist=1)
     nc.tolist=0
     result = nc.getResultCoords() ### tested call ###
     # confirm shape
     self.assertEqual((n, 4), Numeric.shape(result))
     # confirm type
     self.assertEqual(type(Numeric.array([])), type(result))
コード例 #6
0
ファイル: ncoordstest.py プロジェクト: 8848/Pymol-script-repo
 def test_getResultCoords_shape(self):
     """getResultCoords  -- if tolist: return nx3 ListType"""
     n = len(self.random_points)
     nc = Ncoords(self.random_points, tolist=0)
     nc.tolist=1
     result = nc.getResultCoords() ### tested call ###
     # confirm shape
     self.assertEqual((n, 3), Numeric.shape(result))
     # confirm type
     self.assertEqual(type([]), type(result))