Add or remove empty lines to match the needed ones around
blocks/functions/etc.
This is just formatting, no behaviour changes.
---
generator/python.ml | 2 ++
python/t/test010Load.py | 1 +
python/t/test070OptArgs.py | 1 +
python/t/test080Version.py | 1 +
python/t/test090RetValues.py | 11 -----------
python/t/test100Launch.py | 1 +
python/t/test410CloseEvent.py | 2 ++
python/t/test420LogMessages.py | 2 ++
python/t/test800ExplicitClose.py | 2 ++
python/t/test810RHBZ811650.py | 1 +
python/t/test820RHBZ912499.py | 1 +
python/t/test910Libvirt.py | 1 +
tests/http/test-http.py | 1 +
13 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/generator/python.ml b/generator/python.ml
index a7fa2c5..8da36bc 100644
--- a/generator/python.ml
+++ b/generator/python.ml
@@ -694,9 +694,11 @@ def event_to_string(events):
\"\"\"Return a printable string from an event or event
bitmask\"\"\"
return libguestfsmod.event_to_string(events)
+
class ClosedHandle(ValueError):
pass
+
class GuestFS(object):
\"\"\"Instances of this class are libguestfs API
handles.\"\"\"
diff --git a/python/t/test010Load.py b/python/t/test010Load.py
index cbc799b..97a34da 100644
--- a/python/t/test010Load.py
+++ b/python/t/test010Load.py
@@ -17,6 +17,7 @@
import unittest
+
class Test010Load(unittest.TestCase):
def test_import(self):
import guestfs
diff --git a/python/t/test070OptArgs.py b/python/t/test070OptArgs.py
index ba3a9e9..2f07ab0 100644
--- a/python/t/test070OptArgs.py
+++ b/python/t/test070OptArgs.py
@@ -19,6 +19,7 @@ import unittest
import os
import guestfs
+
class Test070OptArgs(unittest.TestCase):
def setUp(self):
self.g = guestfs.GuestFS(python_return_dict=True)
diff --git a/python/t/test080Version.py b/python/t/test080Version.py
index 080c24b..4fc791a 100644
--- a/python/t/test080Version.py
+++ b/python/t/test080Version.py
@@ -21,6 +21,7 @@ import os
import guestfs
from .tests_helper import *
+
class Test080Version(unittest.TestCase):
def setUp(self):
self.g = guestfs.GuestFS(python_return_dict=True)
diff --git a/python/t/test090RetValues.py b/python/t/test090RetValues.py
index bb10ce3..c310cf1 100644
--- a/python/t/test090RetValues.py
+++ b/python/t/test090RetValues.py
@@ -30,7 +30,6 @@ class Test090PythonRetValues(unittest.TestCase):
self.assertRaises(RuntimeError, g.internal_test_rinterr)
-
def test_rint64(self):
g = guestfs.GuestFS()
@@ -38,7 +37,6 @@ class Test090PythonRetValues(unittest.TestCase):
self.assertRaises(RuntimeError, g.internal_test_rint64err)
-
def test_rbool(self):
g = guestfs.GuestFS()
@@ -47,7 +45,6 @@ class Test090PythonRetValues(unittest.TestCase):
self.assertRaises(RuntimeError, g.internal_test_rboolerr)
-
def test_rconststring(self):
g = guestfs.GuestFS()
@@ -55,7 +52,6 @@ class Test090PythonRetValues(unittest.TestCase):
self.assertRaises(RuntimeError, g.internal_test_rconststringerr)
-
def test_rconstoptstring(self):
g = guestfs.GuestFS()
@@ -64,7 +60,6 @@ class Test090PythonRetValues(unittest.TestCase):
# this never fails
self.assertIsNone(g.internal_test_rconstoptstringerr())
-
def test_rstring(self):
g = guestfs.GuestFS()
@@ -72,7 +67,6 @@ class Test090PythonRetValues(unittest.TestCase):
self.assertRaises(RuntimeError, g.internal_test_rstringerr)
-
def test_rstringlist(self):
g = guestfs.GuestFS()
@@ -81,7 +75,6 @@ class Test090PythonRetValues(unittest.TestCase):
self.assertRaises(RuntimeError, g.internal_test_rstringlisterr)
-
def test_rstruct(self):
g = guestfs.GuestFS()
@@ -91,7 +84,6 @@ class Test090PythonRetValues(unittest.TestCase):
self.assertRaises(RuntimeError, g.internal_test_rstructerr)
-
def test_rstructlist(self):
g = guestfs.GuestFS()
@@ -105,7 +97,6 @@ class Test090PythonRetValues(unittest.TestCase):
self.assertRaises(RuntimeError, g.internal_test_rstructlisterr)
-
def test_rhashtable_list(self):
g = guestfs.GuestFS(python_return_dict=False)
@@ -116,7 +107,6 @@ class Test090PythonRetValues(unittest.TestCase):
self.assertRaises(RuntimeError, g.internal_test_rhashtableerr)
-
def test_rhashtable_dict(self):
g = guestfs.GuestFS(python_return_dict=True)
@@ -126,7 +116,6 @@ class Test090PythonRetValues(unittest.TestCase):
self.assertRaises(RuntimeError, g.internal_test_rhashtableerr)
-
def test_rbufferout(self):
g = guestfs.GuestFS()
diff --git a/python/t/test100Launch.py b/python/t/test100Launch.py
index 5d78ccc..4b2c155 100644
--- a/python/t/test100Launch.py
+++ b/python/t/test100Launch.py
@@ -19,6 +19,7 @@ import unittest
import os
import guestfs
+
class Test100Launch(unittest.TestCase):
def test_launch(self):
g = guestfs.GuestFS(python_return_dict=True)
diff --git a/python/t/test410CloseEvent.py b/python/t/test410CloseEvent.py
index bc007e1..e0b38c7 100644
--- a/python/t/test410CloseEvent.py
+++ b/python/t/test410CloseEvent.py
@@ -21,10 +21,12 @@ import guestfs
close_invoked = 0
+
def close_callback(ev, eh, buf, array):
global close_invoked
close_invoked += 1
+
class Test410CloseEvent(unittest.TestCase):
def test_close_event(self):
g = guestfs.GuestFS(python_return_dict=True)
diff --git a/python/t/test420LogMessages.py b/python/t/test420LogMessages.py
index 56c9500..ad98ea0 100644
--- a/python/t/test420LogMessages.py
+++ b/python/t/test420LogMessages.py
@@ -21,6 +21,7 @@ import guestfs
log_invoked = 0
+
def log_callback(ev, eh, buf, array):
global log_invoked
log_invoked += 1
@@ -32,6 +33,7 @@ def log_callback(ev, eh, buf, array):
print("python event logged: event=%s eh=%d buf='%s' array=%s" %
(guestfs.event_to_string(ev), eh, buf, array))
+
class Test420LogMessages(unittest.TestCase):
def test_log_messages(self):
g = guestfs.GuestFS(python_return_dict=True)
diff --git a/python/t/test800ExplicitClose.py b/python/t/test800ExplicitClose.py
index a8ec8bd..c380e99 100644
--- a/python/t/test800ExplicitClose.py
+++ b/python/t/test800ExplicitClose.py
@@ -23,10 +23,12 @@ import guestfs
close_invoked = 0
+
def close_callback(ev, eh, buf, array):
global close_invoked
close_invoked += 1
+
class Test800ExplicitClose(unittest.TestCase):
def test_explicit_close(self):
g = guestfs.GuestFS(python_return_dict=True)
diff --git a/python/t/test810RHBZ811650.py b/python/t/test810RHBZ811650.py
index 4a1192c..71386bb 100644
--- a/python/t/test810RHBZ811650.py
+++ b/python/t/test810RHBZ811650.py
@@ -19,6 +19,7 @@ import unittest
import os
import guestfs
+
class Test810RHBZ811650(unittest.TestCase):
def test_rhbz811650(self):
g = guestfs.GuestFS(python_return_dict=True)
diff --git a/python/t/test820RHBZ912499.py b/python/t/test820RHBZ912499.py
index c315c66..800b7dd 100644
--- a/python/t/test820RHBZ912499.py
+++ b/python/t/test820RHBZ912499.py
@@ -28,6 +28,7 @@ import sys
import guestfs
from .tests_helper import *
+
@skipUnlessArchMatches("(i.86|x86_64)") # If the architecture doesn't
support IDE, skip the test.
@skipUnlessGuestfsBackendIs('libvirt')
@skipUnlessLibvirtHasCPointer()
diff --git a/python/t/test910Libvirt.py b/python/t/test910Libvirt.py
index a84963f..3f8f317 100644
--- a/python/t/test910Libvirt.py
+++ b/python/t/test910Libvirt.py
@@ -28,6 +28,7 @@ from .tests_helper import *
guestsdir = os.environ['guestsdir']
+
@skipUnlessLibvirtHasCPointer()
class Test910Libvirt(unittest.TestCase):
def test_libvirt(self):
diff --git a/tests/http/test-http.py b/tests/http/test-http.py
index fa263a0..2876ea5 100755
--- a/tests/http/test-http.py
+++ b/tests/http/test-http.py
@@ -41,6 +41,7 @@ del os.environ['http_proxy']
# Remove the stamp file.
stampfile = "%s/stamp-test-http" % os.getcwd()
+
def unlink_stampfile():
try:
os.unlink(stampfile)
--
2.5.5