Displaying 2 results from an estimated 2 matches for "catch_warn".
2019 Apr 24
0
[PATCH 3/3] python: silence usage of add_cdrom in test
...warnings
import guestfs
class Test050HandleProperties(unittest.TestCase):
@@ -44,4 +45,6 @@ class Test050HandleProperties(unittest.TestCase):
def test_add_cdrom(self):
g = guestfs.GuestFS(python_return_dict=True)
- g.add_cdrom("/dev/zero")
+ with warnings.catch_warnings():
+ warnings.filterwarnings("ignore", category=DeprecationWarning)
+ g.add_cdrom("/dev/zero")
--
2.20.1
2019 Apr 24
4
[PATCH 0/3] Few minor changes for bindings
*** BLURB HERE ***
Pino Toscano (3):
python: modernize inspect_vm example
perl: silence usage of add_cdrom in test
python: silence usage of add_cdrom in test
perl/t/060-handle-properties.t | 7 +++++--
python/examples/inspect_vm.py | 26 ++++++++++++--------------
python/t/test050HandleProperties.py | 5 ++++-
3 files changed, 21 insertions(+), 17 deletions(-)
--
2.20.1