mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-11-02 20:30:17 -06:00
Improve the test framework to run for multiple classes defined in a single file. Fixes #5071.
This commit is contained in:
1 parent
be4b8284c5
commit
ed279cac31
3 files changed
+11
-3
No files matched your search
@@ -48,7 +48,12 @@ class TestsGeneratorRegistry(ABCMeta):
|
||||
# Avoid registering the BaseDriver itself
|
||||
|
||||
if name != 'BaseTestGenerator' and name != 'BaseFeatureTest':
|
||||
TestsGeneratorRegistry.registry[d['__module__']] = cls
|
||||
# Store/append test classes in 'registry' if test modules has
|
||||
# multiple classes
|
||||
if d['__module__'] in TestsGeneratorRegistry.registry:
|
||||
TestsGeneratorRegistry.registry[d['__module__']].append(cls)
|
||||
else:
|
||||
TestsGeneratorRegistry.registry[d['__module__']] = [cls]
|
||||
|
||||
ABCMeta.__init__(cls, name, bases, d)
|
||||
|
||||
|
||||
Reference in new issue
Block a user