ViewPaneCommands_test.py 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 TestViewPaneAutomation(object):
  24. def test_ViewPane(self, request, editor, level, launcher_platform):
  25. unexpected_lines=[]
  26. expected_lines = [
  27. "set_viewport_size works",
  28. "resize_viewport works",
  29. "get_viewport_expansion_policy works",
  30. "set_viewport_expansion_policy works",
  31. "get_view_pane_layout works",
  32. "set_view_pane_layout works"
  33. # "get_viewport_count works",
  34. # "get_active_viewport works",
  35. # "set_active_viewport works"
  36. ]
  37. test_case_file = os.path.join(os.path.dirname(__file__), 'ViewPaneCommands_test_case.py')
  38. launch_test_case(editor, test_case_file, expected_lines, unexpected_lines)