本文整理汇总了Python中source.shape_checker.get_quad_type函数的典型用法代码示例。如果您正苦于以下问题:Python get_quad_type函数的具体用法?Python get_quad_type怎么用?Python get_quad_type使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_quad_type函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_quad_large_angle
def test_get_quad_large_angle(self):
result = get_quad_type([3.3, 3.3, 3.3, 3.3, 3690, 3690, 3690, 3690])
self.assertEqual(result, 'Square')
示例2: test_square_tuple
def test_square_tuple(self):
"""Quad test"""
result = get_quad_type((1, 1, 1, 1, 90, 90, 90, 90))
self.assertEqual(result, 'square')
示例3: test_dict
def test_dict(self):
"""Quad test"""
result = get_quad_type({'side0': 1, 'side1': 1, 'side2': 1, 'side3': 1,
'corner0': 90, 'corner1': 90, 'corner2': 90, 'corner3': 90})
self.assertEqual(result, 'invalid')
示例4: test_disconnected_all_int
def test_disconnected_all_int(self):
"""Quad test"""
result = get_quad_type(1, 1, 1, 1, 10, 10, 10, 10)
self.assertEqual(result, 'disconnected')
示例5: test_rect_all_float
def test_rect_all_float(self):
"""Quad test"""
result = get_quad_type(1.1, 1.2, 1.1, 1.2, 90.0, 90.0, 90.0, 90.0)
self.assertEqual(result, 'rectangle')
示例6: test_rect_all_int
def test_rect_all_int(self):
"""Quad test"""
result = get_quad_type(1, 2, 1, 2, 90, 90, 90, 90)
self.assertEqual(result, 'rectangle')
示例7: test_unknown_all_int_0
def test_unknown_all_int_0(self):
"""Quad test"""
result = get_quad_type(1, 2, 3, 4, 90, 90, 90, 90)
self.assertEqual(result, 'unknown')
示例8: test_get_quadrilateral_square
def test_get_quadrilateral_square(self):
result = get_quad_type(1,1,1,1)
self.assertEqual(result, 'square')
示例9: test_get_quadrilateral_rect_C
def test_get_quadrilateral_rect_C(self):
result = get_quad_type(1,1,2,2)
self.assertEqual(result, 'rectangle')
示例10: test_get_quadrilateral_dict
def test_get_quadrilateral_dict(self):
d = {"One":1,"Two":1,"Three":1,"Four":1}
result = get_quad_type(d)
self.assertEqual(result, 'square')
示例11: test_get_quadrilateral_char
def test_get_quadrilateral_char(self):
result = get_quad_type('A', 'A', 'A', 'A')
self.assertEqual(result, 'invalid')
示例12: test_get_quadrilateral_list
def test_get_quadrilateral_list(self):
l = [1,1,1,1]
result = get_quad_type(l)
self.assertEqual(result, 'square')
示例13: test_get_quadrilateral_tuple
def test_get_quadrilateral_tuple(self):
t = 1,1,1,1
result = get_quad_type(t)
self.assertEqual(result, 'square')
示例14: test_get_quad_large_negative_angle
def test_get_quad_large_negative_angle(self):
result = get_quad_type([3.3, 3.3, 3.3, 3.3, -3870, -3870, -3870, -3870])
self.assertEqual(result, 'Square')
示例15: test_large_num
def test_large_num(self):
"""Technically this should return quadrilateral but oh well"""
result = get_quad_type(100000000000, 100000000000, 100000000000)
self.assertEqual(result, 'invalid')