diff options
author | Campbell Barton <campbell@blender.org> | 2022-04-08 05:49:02 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-04-08 06:28:55 +0300 |
commit | ee292a1d66b22d8707a493550138ead91b3c0ccc (patch) | |
tree | ce67a52e01e4dc3bbc1841b01615b3641f431bcc /tests/python | |
parent | 982aea88e0d74020c62c2054a45eeafa56c8ca30 (diff) |
PyAPI: use keyword only arguments for Text.region_{from/to} string
This is the convention for most parts of Blender Python API.
Diffstat (limited to 'tests/python')
-rw-r--r-- | tests/python/bl_pyapi_text.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/python/bl_pyapi_text.py b/tests/python/bl_pyapi_text.py index 67e07e7d907..0d8987fb69d 100644 --- a/tests/python/bl_pyapi_text.py +++ b/tests/python/bl_pyapi_text.py @@ -40,9 +40,9 @@ class TestText(unittest.TestCase): ) self.text.write(tmp_text) # Get string in the middle of the text. - self.assertEqual(self.text.region_as_string(((1, 0), (1, -1))), "Line 2: test line 2") + self.assertEqual(self.text.region_as_string(range=((1, 0), (1, -1))), "Line 2: test line 2") # Big range test. - self.assertEqual(self.text.region_as_string(((-10000, -10000), (10000, 10000))), tmp_text) + self.assertEqual(self.text.region_as_string(range=((-10000, -10000), (10000, 10000))), tmp_text) def test_text_region_from_string(self): tmp_text = ( @@ -52,10 +52,10 @@ class TestText(unittest.TestCase): ) self.text.write(tmp_text) # Set string in the middle of the text. - self.text.region_from_string("line 2", ((1, 0), (1, -1))) + self.text.region_from_string("line 2", range=((1, 0), (1, -1))) self.assertEqual(self.text.as_string(), tmp_text.replace("Line 2: test line 2", "line 2") + "\n") # Large range test. - self.text.region_from_string("New Text", ((-10000, -10000), (10000, 10000))) + self.text.region_from_string("New Text", range=((-10000, -10000), (10000, 10000))) self.assertEqual(self.text.as_string(), "New Text\n") |