mirror of
https://github.com/blender/blender
synced 2026-11-22 03:45:13 +03:00
Fix the following misspellings in classes, functions, and variable
names in the tests/python directory (so nothing users will be able to
see).
"test_dependency_instatiation" -> "test_dependency_instantiation"
"test_recusive_instantiation" -> "test_recursive_instantiation"
"visisted_paths" -> "visited_paths"
"TesselatePolygon" -> "TessellatePolygon"
"test_get_prim_map_export_xfrom_not_merged_animated" -> "test_get_prim_map_export_xform_not_merged_animated"
"test_get_prim_map_export_xfrom_not_merged" ->
"test_get_prim_map_export_xform_not_merged"
"test_get_prim_map_export_xfrom_merged" ->
"test_get_prim_map_export_xform_merged"
"SequencerLoadMetastaskTest" -> "SequencerLoadMetastackTest"
"Tesselate" (with one "l") isn't necessarily a misspelling, but the
spelling with two "l"s is the preference in most of the first party
code, including the variables used inside of this class.
No functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/164793
46 lines
1.3 KiB
Python
46 lines
1.3 KiB
Python
# SPDX-FileCopyrightText: 2020-2022 Blender Authors
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
# To run all tests, use
|
|
# BLENDER_VERBOSE=1 ./bin/blender --background ../tests/files/sequence_editing/vse_load_meta_stack.blend --python ../blender/tests/python/sequencer_load_meta_stack.py
|
|
# (that assumes the test is run from a build directory in the same directory as the source code)
|
|
import bpy
|
|
|
|
import argparse
|
|
import sys
|
|
import unittest
|
|
|
|
|
|
class SequencerLoadMetastackTest(unittest.TestCase):
|
|
def get_sequence_editor(self):
|
|
return bpy.context.scene.sequence_editor
|
|
|
|
def test_meta_stack(self):
|
|
sequence_editor = self.get_sequence_editor()
|
|
|
|
meta_stack = sequence_editor.meta_stack
|
|
self.assertEqual(len(meta_stack), 1)
|
|
self.assertEqual(meta_stack[0].name, "MetaStrip")
|
|
|
|
self.assertEqual(len(meta_stack[0].strips), 1)
|
|
self.assertEqual(meta_stack[0].strips[0].name, "Color")
|
|
|
|
# accesses ed->current_strips() through screen_ctx_selected_editable_strips
|
|
bpy.context.copy()
|
|
|
|
|
|
def main():
|
|
argv = [sys.argv[0]]
|
|
if '--' in sys.argv:
|
|
argv += sys.argv[sys.argv.index('--') + 1:]
|
|
|
|
parser = argparse.ArgumentParser()
|
|
|
|
args, remaining = parser.parse_known_args(argv)
|
|
|
|
unittest.main(argv=remaining)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|