Part: Add regression test for issue #4456 (skipped for now)
This commit is contained in:
@@ -53,6 +53,7 @@ set(CompoundTools_Scripts
|
||||
set(Part_tests
|
||||
parttests/__init__.py
|
||||
parttests/part_test_objects.py
|
||||
parttests/regression_tests.py
|
||||
)
|
||||
|
||||
add_custom_target(PartScripts ALL SOURCES
|
||||
|
||||
@@ -19,11 +19,13 @@
|
||||
# USA *
|
||||
#**************************************************************************
|
||||
|
||||
import FreeCAD, os, sys, unittest, Part
|
||||
import FreeCAD, unittest, Part
|
||||
import copy
|
||||
from FreeCAD import Units
|
||||
App = FreeCAD
|
||||
|
||||
from parttests.regression_tests import RegressionTests
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# define the test cases to test the FreeCAD Part module
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
22
src/Mod/Part/parttests/regression_tests.py
Normal file
22
src/Mod/Part/parttests/regression_tests.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from FreeCAD import Vector
|
||||
import Part
|
||||
|
||||
import unittest
|
||||
|
||||
class RegressionTests(unittest.TestCase):
|
||||
|
||||
@unittest.skip("issue 4456")
|
||||
def test_issue_4456(self):
|
||||
"""
|
||||
0004456: Regression : Part.Plane.Intersect do not accept plane as argument
|
||||
"""
|
||||
p1 = Part.Plane()
|
||||
p2 = Part.Plane(Vector(0, 0, 0), Vector(1, 0, 0))
|
||||
|
||||
result = p1.intersect(p2)
|
||||
line = result.pop()
|
||||
self.assertEqual(line.Location, Vector(0, 0, 0))
|
||||
self.assertEqual(line.Direction, Vector(0, 1, 0))
|
||||
# We should now have empty list...
|
||||
with self.assertRaises(IndexError):
|
||||
result.pop()
|
||||
Reference in New Issue
Block a user