mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-12-07 04:23:47 +03:00
sanitytest: Use 3-tuple for finalklassmap
Signed-off-by: Philipp Hahn <hahn@univention.de>
This commit is contained in:
@@ -323,15 +323,12 @@ for name, (klass, func, cname) in sorted(basicklassmap.items()):
|
||||
if func == "mACString":
|
||||
func = "MACString"
|
||||
|
||||
finalklassmap[name] = [klass, func, cname]
|
||||
finalklassmap[name] = (klass, func, cname)
|
||||
|
||||
|
||||
# Phase 5: Validate sure that every C API is mapped to a python API
|
||||
usedfunctions = {} # type: Dict[str, int]
|
||||
for name in sorted(finalklassmap):
|
||||
klass = finalklassmap[name][0]
|
||||
func = finalklassmap[name][1]
|
||||
|
||||
for name, (klass, func, cname) in sorted(finalklassmap.items()):
|
||||
if func in gotfunctions[klass]:
|
||||
usedfunctions["%s.%s" % (klass, func)] = 1
|
||||
if verbose:
|
||||
@@ -361,9 +358,7 @@ for klass in gotfunctions:
|
||||
print("PASS %s.%s" % (klass, func))
|
||||
|
||||
# Phase 7: Validate that all the low level C APIs have binding
|
||||
for name in sorted(finalklassmap):
|
||||
cname = finalklassmap[name][2]
|
||||
|
||||
for name, (klass, func, cname) in sorted(finalklassmap.items()):
|
||||
pyname = cname
|
||||
if pyname == "virSetErrorFunc":
|
||||
pyname = "virRegisterErrorHandler"
|
||||
|
||||
Reference in New Issue
Block a user