ComponentAssetCommands_test.py 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. """
  2. All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
  3. its licensors.
  4. For complete copyright and license terms please see the LICENSE at the root of this
  5. distribution (the "License"). All use of this software is governed by the License,
  6. or, if provided, by the license below or the license accompanying this file. Do not
  7. remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
  8. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. """
  10. #
  11. # This is a pytest module to test the in-Editor Python API from PythonEditorFuncs
  12. #
  13. import pytest
  14. pytest.importorskip('ly_test_tools')
  15. import sys
  16. import os
  17. sys.path.append(os.path.dirname(__file__))
  18. from hydra_utils import launch_test_case
  19. @pytest.mark.SUITE_sandbox
  20. @pytest.mark.parametrize('launcher_platform', ['windows_editor'])
  21. @pytest.mark.parametrize('project', ['AutomatedTesting'])
  22. @pytest.mark.parametrize('level', ['Simple'])
  23. class TestGradientRequiresShape(object):
  24. def test_ComponentAsset(self, request, editor, level, launcher_platform):
  25. unexpected_lines=[]
  26. expected_lines = [
  27. "New entity with no parent created: SUCCESS",
  28. "Mesh component added to entity: SUCCESS",
  29. "Entity has a Mesh component: SUCCESS",
  30. "GetSetCompare Test Controller|Configuration|Mesh Asset: SUCCESS",
  31. "GetSetCompare Clear Controller|Configuration|Mesh Asset: SUCCESS",
  32. "PTE Test Controller|Configuration|Mesh Asset: SUCCESS",
  33. "PTE Clear Controller|Configuration|Mesh Asset: SUCCESS",
  34. ]
  35. test_case_file = os.path.join(os.path.dirname(__file__), 'ComponentAssetCommands_test_case.py')
  36. launch_test_case(editor, test_case_file, expected_lines, unexpected_lines)