mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-11 03:31:29 -07:00
Update vmware_inventory (#26308)
Fix adds * Exception handling * Unit tests Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
4e01397817
commit
f7c8e7bdab
2 changed files with 39 additions and 25 deletions
|
@ -3,11 +3,17 @@ import os
|
|||
import pickle
|
||||
import unittest
|
||||
import sys
|
||||
from nose.plugins.skip import SkipTest
|
||||
|
||||
|
||||
try:
|
||||
from pyVmomi import vim, vmodl
|
||||
except ImportError:
|
||||
raise SkipTest("test_vmware_inventory.py requires the python module 'pyVmomi'")
|
||||
|
||||
try:
|
||||
from vmware_inventory import VMWareInventory
|
||||
except ImportError:
|
||||
from nose.plugins.skip import SkipTest
|
||||
raise SkipTest("test_vmware_inventory.py requires the python module 'vmware_inventory'")
|
||||
|
||||
# contrib's dirstruct doesn't contain __init__.py files
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue