Prechádzať zdrojové kódy

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 rokov pred
rodič
commit
af56ca1261

+ 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
 
     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):
             self.results = {}  # Dict of str(test_spec.__name__) -> Result
             self.asset_processor = None