From bf00d82b025c80c0b9015d49c28a62059c1e1c9a Mon Sep 17 00:00:00 2001 From: sweeneys Date: Wed, 10 Nov 2021 17:26:32 -0800 Subject: [PATCH] Fix linux-specific test failures Signed-off-by: sweeneys --- .../smoke/test_CLITool_SerializeContextTools_Works.py | 3 +++ Tools/LyTestTools/tests/unit/test_editor_test_utils.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_SerializeContextTools_Works.py b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_SerializeContextTools_Works.py index a3f6b8b09f..20960d9ee8 100644 --- a/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_SerializeContextTools_Works.py +++ b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_SerializeContextTools_Works.py @@ -13,7 +13,10 @@ import os import pytest import subprocess +import ly_test_tools + +@pytest.mark.skipif(not ly_test_tools.WINDOWS, "SerializeContextTools only available on Windows") @pytest.mark.SUITE_smoke class TestCLIToolSerializeContextToolsWorks(object): def test_CLITool_SerializeContextTools_Works(self, build_directory): diff --git a/Tools/LyTestTools/tests/unit/test_editor_test_utils.py b/Tools/LyTestTools/tests/unit/test_editor_test_utils.py index bf7fae7189..db59d18610 100644 --- a/Tools/LyTestTools/tests/unit/test_editor_test_utils.py +++ b/Tools/LyTestTools/tests/unit/test_editor_test_utils.py @@ -74,9 +74,9 @@ class TestEditorTestUtils(unittest.TestCase): def test_RetrieveCrashOutput_CrashLogNotExists_ReturnsError(self, mock_retrieve_log_path): mock_retrieve_log_path.return_value = 'mock_log_path' mock_workspace = mock.MagicMock() - expected = "-- No crash log available --\n[Errno 2] No such file or directory: 'mock_log_path\\\\error.log'" + error_message = "No crash log available" - assert expected == editor_test_utils.retrieve_crash_output(0, mock_workspace, 0) + assert error_message in editor_test_utils.retrieve_crash_output(0, mock_workspace, 0) @mock.patch('os.path.getmtime', mock.MagicMock()) @mock.patch('os.rename')