Просмотр исходного кода

Remove a pytest warning when pytest tries to collect 'TestData' because it has 'Test' in the name

Signed-off-by: Gene Walters <[email protected]>
Gene Walters 3 лет назад
Родитель
Сommit
af56ca1261
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      Tools/LyTestTools/ly_test_tools/o3de/editor_test.py

+ 2 - 0
Tools/LyTestTools/ly_test_tools/o3de/editor_test.py

@@ -331,6 +331,8 @@ class EditorTestSuite:
     _TEST_FAIL_RETCODE = 0xF  # Return code for test failure
     _TEST_FAIL_RETCODE = 0xF  # Return code for test failure
 
 
     class TestData:
     class TestData:
+        __test__ = False  # Required to tell PyTest to skip collecting this class even though it has "Test" in the name; avoids PyTest warnings.
+
         def __init__(self):
         def __init__(self):
             self.results = {}  # Dict of str(test_spec.__name__) -> Result
             self.results = {}  # Dict of str(test_spec.__name__) -> Result
             self.asset_processor = None
             self.asset_processor = None