test_move_into_layer_collection_a.py 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # ############################################################
  2. # Importing - Same For All Render Layer Tests
  3. # ############################################################
  4. import unittest
  5. import os
  6. import sys
  7. from view_layer_common import *
  8. # ############################################################
  9. # Testing
  10. # ############################################################
  11. class UnitTesting(MoveLayerCollectionTesting):
  12. def get_reference_scene_tree_map(self):
  13. # original tree, no changes
  14. reference_tree_map = [
  15. ['A', [
  16. ['i', None],
  17. ['ii', None],
  18. ['iii', None],
  19. ]],
  20. ['B', None],
  21. ['C', [
  22. ['1', None],
  23. ['2', None],
  24. ['3', [
  25. ['dog', None],
  26. ['cat', None],
  27. ]],
  28. ]],
  29. ]
  30. return reference_tree_map
  31. def get_reference_layers_tree_map(self):
  32. # original tree, no changes
  33. reference_layers_map = [
  34. ['Layer 1', [
  35. 'Master Collection',
  36. 'C',
  37. '3',
  38. ]],
  39. ['Layer 2', [
  40. 'C',
  41. '3',
  42. 'dog',
  43. 'cat',
  44. ]],
  45. ]
  46. return reference_layers_map
  47. def test_layer_collection_into(self):
  48. """
  49. Test outliner operations
  50. """
  51. self.setup_tree()
  52. self.assertFalse(self.move_into("Layer 1.C.2", "Layer 2.3"))
  53. self.compare_tree_maps()
  54. # ############################################################
  55. # Main - Same For All Render Layer Tests
  56. # ############################################################
  57. if __name__ == '__main__':
  58. UnitTesting._extra_arguments = setup_extra_arguments(__file__)
  59. unittest.main()