blender/tests/python/render_layer/test_object_add_empty.py
Dalai Felinto 505cc694b3 Layer Unittesting: pep8 2/2
Mass replacing the common code of all tests

```
echo "Fixing $1"

ed "$1" <<'EOF'
1,/Testing/d
i

from render_layer_common import *
import unittest
import os
import sys

sys.path.append(os.path.dirname(__file__))

.
w
q
EOF
```

Using line-width of 120
2017-03-22 15:27:47 +01:00

41 lines
1.2 KiB
Python

# ############################################################
# Importing - Same For All Render Layer Tests
# ############################################################
from render_layer_common import *
import unittest
import os
import sys
sys.path.append(os.path.dirname(__file__))
# ############################################################
# Testing
# ############################################################
class UnitTesting(RenderLayerTesting):
def test_syncing_object_add_empty(self):
"""
See if new objects are added to the correct collection
bpy.ops.object.add()
"""
import os
ROOT = self.get_root()
filepath_json = os.path.join(ROOT, 'layers_object_add_empty.json')
self.do_object_add(filepath_json, 'EMPTY')
# ############################################################
# 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()