test__geometric_intersection.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:bezier 作者: dhermes 项目源码 文件源码
def test_non_convergence(self):
        from bezier import _geometric_intersection

        multiplier = 16384.0
        nodes1 = multiplier * np.asfortranarray([
            [0.0, 0.0],
            [4.5, 9.0],
            [9.0, 0.0],
        ])
        nodes2 = multiplier * np.asfortranarray([
            [0.0, 8.0],
            [6.0, 0.0],
        ])
        with self.assertRaises(ValueError) as exc_info:
            self._call_function_under_test(nodes1, nodes2)

        exc_args = exc_info.exception.args
        expected = _geometric_intersection._NO_CONVERGE_TEMPLATE.format(
            _geometric_intersection._MAX_INTERSECT_SUBDIVISIONS)
        self.assertEqual(exc_args, (expected,))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号