Support internal test cases which are not registered

* This is useful for large tests like Mesh_Zoo and Texture_Zoo which are API
  independent, which can derive from TestCase to get all the helpers, but then
  not get auto-added until an API-specific test derives from them
This commit is contained in:
baldurk
2020-03-12 14:26:49 +00:00
parent 59ccddf31b
commit ea41937617
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ def get_tests():
for m in sys.modules.values():
for name in m.__dict__:
obj = m.__dict__[name]
if isinstance(obj, type) and issubclass(obj, testcase.TestCase) and obj != testcase.TestCase:
if isinstance(obj, type) and issubclass(obj, testcase.TestCase) and obj != testcase.TestCase and not obj.internal:
testcases.append(obj)
testcases.sort(key=lambda t: (t.slow_test,t.__name__))
+1
View File
@@ -128,6 +128,7 @@ class ConstantBufferChecker:
class TestCase:
slow_test = False
internal = False
demos_test_name = ''
demos_frame_cap = 5
_test_list = {}