blender/tests/python/render_layer/test_object_add_torus.py
Dalai Felinto 8261a84ffb Unittest: split object_add in individual test files
(and small cleanup in unittest)

This is required to the upcoming unittest + bugfix
2017-02-24 10:10:24 +01:00

43 lines
1.4 KiB
Python

# ./blender.bin --background -noaudio --python tests/python/render_layer/test_scene_copy.py -- --testdir="/data/lib/tests/"
# ############################################################
# Importing - Same For All Render Layer Tests
# ############################################################
import unittest
import os, sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import *
# ############################################################
# Testing
# ############################################################
class UnitTesting(RenderLayerTesting):
def test_syncing_object_add_torus(self):
"""
See if new objects are added to the correct collection
bpy.ops.mesh.primitive_torus_add()
"""
import os
ROOT = self.get_root()
filepath_json = os.path.join(ROOT, 'layers_object_add_torus.json')
self.do_object_add(filepath_json, 'TORUS')
# ############################################################
# Main - Same For All Render Layer Tests
# ############################################################
if __name__ == '__main__':
import sys
extra_arguments = sys.argv[sys.argv.index("--") + 1:] if "--" in sys.argv else []
sys.argv = [__file__] + (sys.argv[sys.argv.index("--") + 2:] if "--" in sys.argv else [])
UnitTesting._extra_arguments = extra_arguments
unittest.main()