mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix: error checking keyword arguments for mathutils types
Regression in [0] failed to account for keywords being changed from
a dict to a tuple.
Include a test to ensure keyword arguments are ignored.
Ref !149685
[0]: b2176bfdd7
This commit is contained in:
parent
ec3001dc39
commit
dc3cad21d0
6 changed files with 29 additions and 5 deletions
|
|
@ -417,6 +417,30 @@ class ColorTesting(unittest.TestCase):
|
|||
_test_flat_buffer_protocol(self, Color, 3)
|
||||
|
||||
|
||||
# Test features of `mathutils` types.
|
||||
class TypeTesting(unittest.TestCase):
|
||||
|
||||
def test_keywords_unsupported_matrix(self):
|
||||
with self.assertRaises(TypeError) as context:
|
||||
Matrix(dummy=None)
|
||||
self.assertEqual(str(context.exception), "Matrix(): takes no keyword args")
|
||||
|
||||
def test_keywords_unsupported_vector(self):
|
||||
with self.assertRaises(TypeError) as context:
|
||||
Vector(dummy=None)
|
||||
self.assertEqual(str(context.exception), "Vector(): takes no keyword args")
|
||||
|
||||
def test_keywords_unsupported_color(self):
|
||||
with self.assertRaises(TypeError) as context:
|
||||
Color(dummy=None)
|
||||
self.assertEqual(str(context.exception), "mathutils.Color(): takes no keyword args")
|
||||
|
||||
def test_keywords_unsupported_euler(self):
|
||||
with self.assertRaises(TypeError) as context:
|
||||
Euler(dummy=None)
|
||||
self.assertEqual(str(context.exception), "mathutils.Euler(): takes no keyword args")
|
||||
|
||||
|
||||
class KDTreeTesting(unittest.TestCase):
|
||||
@staticmethod
|
||||
def kdtree_create_grid_3d_data(tot):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue