1f17b72efe
I will investigate this further later. The big problem is that the way I'm running tests if I have any error (e.g., ImportError) the pass still pass.
41 lines
1.3 KiB
Python
41 lines
1.3 KiB
Python
# ############################################################
|
|
# Importing - Same For All Render Layer Tests
|
|
# ############################################################
|
|
|
|
import unittest
|
|
import os
|
|
import 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()
|