Rename any instance of scene layer or render layer in code with view layer
[blender.git] / tests / python / view_layer / test_move_above_below_scene_collection_sync_h.py
1 # ############################################################
2 # Importing - Same For All Render Layer Tests
3 # ############################################################
4
5 import unittest
6 import os
7 import sys
8
9 from view_layer_common import *
10
11
12 # ############################################################
13 # Testing
14 # ############################################################
15
16 class UnitTesting(MoveSceneCollectionSyncTesting):
17     def get_reference_scene_tree_map(self):
18         # original tree, no changes
19         return self.get_initial_scene_tree_map()
20
21     def test_scene_collection_move_a(self):
22         """
23         Test outliner operations
24         """
25         import bpy
26         master_collection = bpy.context.scene.master_collection
27
28         tree = self.setup_tree()
29         for collection in tree.values():
30             # can't move into master_collection anywhere
31             self.assertFalse(master_collection.move_above(collection))
32
33         self.compare_tree_maps()
34
35     def test_scene_collection_move_b(self):
36         """
37         Test outliner operations
38         """
39         import bpy
40         master_collection = bpy.context.scene.master_collection
41
42         tree = self.setup_tree()
43         for collection in tree.values():
44             # can't move into master_collection anywhere
45             self.assertFalse(master_collection.move_below(collection))
46
47         self.compare_tree_maps()
48
49     def test_scene_collection_move_c(self):
50         """
51         Test outliner operations
52         """
53         import bpy
54         master_collection = bpy.context.scene.master_collection
55
56         tree = self.setup_tree()
57         for collection in tree.values():
58             # can't move into master_collection anywhere
59             self.assertFalse(collection.move_above(master_collection))
60
61         self.compare_tree_maps()
62
63     def test_scene_collection_move_d(self):
64         """
65         Test outliner operations
66         """
67         import bpy
68         master_collection = bpy.context.scene.master_collection
69
70         tree = self.setup_tree()
71         for collection in tree.values():
72             # can't move into master_collection anywhere
73             self.assertFalse(collection.move_below(master_collection))
74
75         self.compare_tree_maps()
76
77
78 # ############################################################
79 # Main - Same For All Render Layer Tests
80 # ############################################################
81
82 if __name__ == '__main__':
83     UnitTesting._extra_arguments = setup_extra_arguments(__file__)
84     unittest.main()