[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31094] branches/soc-2010-leifandersen: 1.

Leif Andersen leif.a.andersen at gmail.com
Fri Aug 6 06:33:23 CEST 2010


Revision: 31094
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31094
Author:   leifandersen
Date:     2010-08-06 06:33:22 +0200 (Fri, 06 Aug 2010)

Log Message:
-----------
1.  Woops, added the mac/windows commands.

2.  I must be loosing my mind (or svn still hates me), re-adding two files I really thought I had added.

Modified Paths:
--------------
    branches/soc-2010-leifandersen/source/creator/CMakeLists.txt

Added Paths:
-----------
    branches/soc-2010-leifandersen/tests/hash_compare.py
    branches/soc-2010-leifandersen/tests/physics/softbody_basics.py

Modified: branches/soc-2010-leifandersen/source/creator/CMakeLists.txt
===================================================================
--- branches/soc-2010-leifandersen/source/creator/CMakeLists.txt	2010-08-06 04:30:19 UTC (rev 31093)
+++ branches/soc-2010-leifandersen/source/creator/CMakeLists.txt	2010-08-06 04:33:22 UTC (rev 31094)
@@ -292,6 +292,7 @@
 				COMMAND rsync --exclude .svn -r ${Blender_SOURCE_DIR}/tests/* ${Blender_BINARY_DIR}/tests
 				COMMAND cp ${Blender_SOURCE_DIR}/tests/render/run.py ${Blender_BINARY_DIR}/bin/imagediff.py
 				COMMAND cp ${Blender_SOURCE_DIR}/tests/hash_compare.py ${Blender_BINARY_DIR}/bin/hash_compare.py				
+				COMMAND cp ${Blender_SOURCE_DIR}/tests/hashfile.txt ${Blender_BINARY_DIR}/bin/hashfile.txt				
 			)	
 		ENDIF(WITH_TESTS)
 
@@ -393,6 +394,7 @@
 				COMMAND xcopy /E /Y \"${Blender_SOURCE_DIR}\tests\" \"${Blender_BINARY_DIR}\"
 				COMMAND copy /Y \"${Blender_SOURCE_DIR}\\tests\\render\\run.py\" \"${Blender_BINARY_DIR}\\bin\\imagediff.py\\\"
 				COMMAND copy /Y \"${Blender_SOURCE_DIR}\\tests\\hash_compare.py\" \"${Blender_BINARY_DIR}\\bin\\hash_compare.py\\\"
+				COMMAND copy /Y \"${Blender_SOURCE_DIR}\\tests\\hasfile.txt\" \"${Blender_BINARY_DIR}\\bin\\hashfile.txt\\\"
 			)	
 		ENDIF(WITH_TESTS)
 

Added: branches/soc-2010-leifandersen/tests/hash_compare.py
===================================================================
--- branches/soc-2010-leifandersen/tests/hash_compare.py	                        (rev 0)
+++ branches/soc-2010-leifandersen/tests/hash_compare.py	2010-08-06 04:33:22 UTC (rev 31094)
@@ -0,0 +1,32 @@
+import bpy
+import tests
+
+import unittest
+import sys
+import os
+
+data = []
+
+class TestCurrentFile(unittest.TestCase):
+    
+    hash = 0
+    
+    def setUp(self):
+        for hashpair in data:
+            if hashpair[0] == os.path.split(bpy.data.filepath)[1]:
+                self.hash = hashpair[1]
+    
+    def test_case(self):
+        bpy.ops.tests.hash()
+        self.assertEquals(self.hash, tests.hashfile.last_hash)
+
+def suite():
+    return unittest.TestSuite([
+unittest.TestLoader().loadTestsFromTestCase(TestCurrentFile),
+])
+
+if __name__ == "__main__":
+    print(bpy.ops.tests.read_hashfile(filepath=os.path.join(os.path.split(sys.argv[0])[0], 'hashfile.txt')))
+    data = tests.hashfile.data
+    unittest.TextTestRunner(verbosity=2).run(suite())
+    bpy.ops.wm.exit_blender()
\ No newline at end of file

Added: branches/soc-2010-leifandersen/tests/physics/softbody_basics.py
===================================================================
--- branches/soc-2010-leifandersen/tests/physics/softbody_basics.py	                        (rev 0)
+++ branches/soc-2010-leifandersen/tests/physics/softbody_basics.py	2010-08-06 04:33:22 UTC (rev 31094)
@@ -0,0 +1,5 @@
+import bpy
+
+bpy.ops.paint.weight_paint_toggle()
+bpy.ops.paint.weight_paint(stroke=[{"name":"", "pen_flip":False, "location":(0,0,0), "mouse":(1068, 600), "pressure":1}])
+bpy.ops.paint.weight_paint_toggle()





More information about the Bf-blender-cvs mailing list