Updated to work with 0.13
- This is _totally_ experimental, and I haven't done exhaustive tests - 88 unit tests do pass though, and I added a new import test. - 0.12 and 0.13 seem to structure stuff a bit differently, probably due to changes in the FreeCAD lib wrappers. - Not tested on windows (but should work) or 0.12. Need some help there.
This commit is contained in:
@ -3,9 +3,15 @@ import sys
|
||||
|
||||
import unittest
|
||||
from tests import BaseTest
|
||||
import FreeCAD
|
||||
|
||||
from cadquery.freecad_impl.verutil import fc_import
|
||||
FreeCAD = fc_import("FreeCAD")
|
||||
if not hasattr(FreeCAD, 'Part'):
|
||||
FreeCAD.Part = fc_import("FreeCAD.Part")
|
||||
|
||||
|
||||
from cadquery import *
|
||||
|
||||
|
||||
class TestCadObjects(BaseTest):
|
||||
|
||||
def testVectorConstructors(self):
|
||||
@ -57,6 +63,6 @@ class TestCadObjects(BaseTest):
|
||||
def testVertices(self):
|
||||
e = Shape.cast(FreeCAD.Part.makeLine((0,0,0),(1,1,0)))
|
||||
self.assertEquals(2,len(e.Vertices()))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user