diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-04-19 14:05:34 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-04-19 15:35:29 +0300 |
commit | 9c84d9981909333882b1d71954cee6710dd88748 (patch) | |
tree | d15ece2f925ca60c61bdec69c37cf54d69fa85fd /tests | |
parent | bca55e7adf451a2cf3c0c19ce906f95a6a890d53 (diff) |
Unittests: Layer render settings evaluation
More failing unittests to add to the existing ones.
Diffstat (limited to 'tests')
4 files changed, 121 insertions, 0 deletions
diff --git a/tests/python/render_layer/CMakeLists.txt b/tests/python/render_layer/CMakeLists.txt index 2ec944d693f..5bcc87d8441 100644 --- a/tests/python/render_layer/CMakeLists.txt +++ b/tests/python/render_layer/CMakeLists.txt @@ -69,6 +69,9 @@ RENDER_LAYER_TEST(evaluation_render_settings_d) RENDER_LAYER_TEST(evaluation_render_settings_e) RENDER_LAYER_TEST(evaluation_render_settings_f) RENDER_LAYER_TEST(evaluation_render_settings_g) +RENDER_LAYER_TEST(evaluation_render_settings_h) +RENDER_LAYER_TEST(evaluation_render_settings_i) +RENDER_LAYER_TEST(evaluation_render_settings_j) RENDER_LAYER_TEST(evaluation_visibility_a) RENDER_LAYER_TEST(evaluation_visibility_b) RENDER_LAYER_TEST(evaluation_visibility_c) diff --git a/tests/python/render_layer/test_evaluation_render_settings_h.py b/tests/python/render_layer/test_evaluation_render_settings_h.py new file mode 100644 index 00000000000..3cfd0625562 --- /dev/null +++ b/tests/python/render_layer/test_evaluation_render_settings_h.py @@ -0,0 +1,39 @@ +# ############################################################ +# Importing - Same For All Render Layer Tests +# ############################################################ + +import unittest +import os +import sys + +from render_layer_common import * + + +# ############################################################ +# Testing +# ############################################################ + +class UnitTesting(RenderLayerTesting): + def test_render_settings(self): + """ + See if the depsgraph evaluation is correct + """ + clay = Clay() + self.assertEqual(clay.get('object', 'matcap_icon'), '01') + + clay.set('mom', 'matcap_icon', '02') + self.assertEqual(clay.get('object', 'matcap_icon'), '02') + + +# ############################################################ +# 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() diff --git a/tests/python/render_layer/test_evaluation_render_settings_i.py b/tests/python/render_layer/test_evaluation_render_settings_i.py new file mode 100644 index 00000000000..25fed7e516b --- /dev/null +++ b/tests/python/render_layer/test_evaluation_render_settings_i.py @@ -0,0 +1,39 @@ +# ############################################################ +# Importing - Same For All Render Layer Tests +# ############################################################ + +import unittest +import os +import sys + +from render_layer_common import * + + +# ############################################################ +# Testing +# ############################################################ + +class UnitTesting(RenderLayerTesting): + def test_render_settings(self): + """ + See if the depsgraph evaluation is correct + """ + clay = Clay(extra_kid_layer=True) + self.assertEqual(clay.get('object', 'matcap_icon'), '01') + + clay.set('mom', 'matcap_icon', '02') + self.assertEqual(clay.get('object', 'matcap_icon'), '02') + + +# ############################################################ +# 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() diff --git a/tests/python/render_layer/test_evaluation_render_settings_j.py b/tests/python/render_layer/test_evaluation_render_settings_j.py new file mode 100644 index 00000000000..256ae76aa92 --- /dev/null +++ b/tests/python/render_layer/test_evaluation_render_settings_j.py @@ -0,0 +1,40 @@ +# ############################################################ +# Importing - Same For All Render Layer Tests +# ############################################################ + +import unittest +import os +import sys + +from render_layer_common import * + + +# ############################################################ +# Testing +# ############################################################ + +class UnitTesting(RenderLayerTesting): + def test_render_settings(self): + """ + See if the depsgraph evaluation is correct + """ + clay = Clay(extra_kid_layer=True) + self.assertEqual(clay.get('object', 'matcap_icon'), '01') + + clay.set('mom', 'matcap_icon', '02') + self.assertEqual(clay.get('extra', 'matcap_icon'), '01') + self.assertEqual(clay.get('object', 'matcap_icon'), '02') + + +# ############################################################ +# 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() |