Author: JonNeal
Date: 2008-03-16 20:51:56 -0400 (Sun, 16 Mar 2008)
New Revision: 1150

Added:
   trunk/pysoy/tests/TestBodyPosition.py
Log:
Ticket #946: Added BodyPosition test, more needs to be added.


Copied: trunk/pysoy/tests/TestBodyPosition.py (from rev 1147, 
trunk/pysoy/src/stubs/Test.py)
===================================================================
--- trunk/pysoy/tests/TestBodyPosition.py                               (rev 0)
+++ trunk/pysoy/tests/TestBodyPosition.py       2008-03-17 00:51:56 UTC (rev 
1150)
@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+
+''' Tests for soy._datatypes.BodyPosition 
+'''
+__credits__ = '''Copyright (C) 2006,2007,2008 PySoy Group
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, see http://www.gnu.org/licenses
+'''
+__author__  = 'PySoy Group'
+__date__    = 'Last change on '+ \
+              '$Date:$'[7:-20]+ \
+              'by '+'$Author:$'[9:-2]
+__version__ = 'Trunk (r'+'$Rev:$'[6:-2]+')'
+
+import soy
+import unittest
+
+class TestBodyPosition(unittest.TestCase):
+  def setUp(self):
+    B = soy._datatypes.BodyPosition((0.0,0.0,0.0))
+    print b
+
+  def test_add(self):
+    self.assertEqual(B+1, (1.0,1.0,1.0))
+
+  def test_sub(self):
+    self.assertEqual(B-1, (-1.0,-1.0,-1.0))
+    
+def TestBodyPositionSuite() :
+  return unittest.TestLoader().loadTestsFromTestCase(TestBodyPosition)
+
+if __name__=='__main__':
+  unittest.main()

_______________________________________________
PySoy-SVN mailing list
PySoy-SVN@pysoy.org
http://www.pysoy.org/mailman/listinfo/pysoy-svn

Reply via email to