mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-08-02 04:21:59 +03:00
test: Invoke print("...") instead of print "..."
The 'print' statement no longer exists in Python 3 and now must be called as a function. This is compatible down to Python 2.4 as we are not using any special syntax of the function.
This commit is contained in:
@ -232,9 +232,9 @@ for name in sorted(finalklassmap):
|
|||||||
if func in gotfunctions[klass]:
|
if func in gotfunctions[klass]:
|
||||||
usedfunctions["%s.%s" % (klass, func)] = 1
|
usedfunctions["%s.%s" % (klass, func)] = 1
|
||||||
if verbose:
|
if verbose:
|
||||||
print "PASS %s -> %s.%s" % (name, klass, func)
|
print("PASS %s -> %s.%s" % (name, klass, func))
|
||||||
else:
|
else:
|
||||||
print "FAIL %s -> %s.%s (C API not mapped to python)" % (name, klass, func)
|
print("FAIL %s -> %s.%s (C API not mapped to python)" % (name, klass, func))
|
||||||
fail = True
|
fail = True
|
||||||
|
|
||||||
|
|
||||||
@ -249,11 +249,11 @@ for klass in gotfunctions:
|
|||||||
|
|
||||||
key = "%s.%s" % (klass, func)
|
key = "%s.%s" % (klass, func)
|
||||||
if not key in usedfunctions:
|
if not key in usedfunctions:
|
||||||
print "FAIL %s.%s (Python API not mapped to C)" % (klass, func)
|
print("FAIL %s.%s (Python API not mapped to C)" % (klass, func))
|
||||||
fail = True
|
fail = True
|
||||||
else:
|
else:
|
||||||
if verbose:
|
if verbose:
|
||||||
print "PASS %s.%s" % (klass, func)
|
print("PASS %s.%s" % (klass, func))
|
||||||
|
|
||||||
# Phase 7: Validate that all the low level C APIs have binding
|
# Phase 7: Validate that all the low level C APIs have binding
|
||||||
for name in sorted(finalklassmap):
|
for name in sorted(finalklassmap):
|
||||||
@ -273,7 +273,7 @@ for name in sorted(finalklassmap):
|
|||||||
try:
|
try:
|
||||||
thing = getattr(libvirt.libvirtmod, pyname)
|
thing = getattr(libvirt.libvirtmod, pyname)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
print "FAIL libvirt.libvirtmod.%s (C binding does not exist)" % pyname
|
print("FAIL libvirt.libvirtmod.%s (C binding does not exist)" % pyname)
|
||||||
fail = True
|
fail = True
|
||||||
|
|
||||||
if fail:
|
if fail:
|
||||||
|
Reference in New Issue
Block a user