Files
create/src/Mod/Part/parttests/regression_tests.py
Priit Laes 4151ec279b Part: Enable test for issue 4456
Now that issue 4456 is fixed, we don't need to skip this test anymore.
2020-10-18 16:26:18 +02:00

22 lines
612 B
Python

from FreeCAD import Vector
import Part
import unittest
class RegressionTests(unittest.TestCase):
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()