mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-19 23:49:09 -07:00
Port some tests away from nose as examples (#33437)
We don't need to use both nose and pytest. Once we get rid of all uses of nose we can remove the extra dependency
This commit is contained in:
parent
c35a562345
commit
e499bccbaa
7 changed files with 19 additions and 23 deletions
|
@ -17,14 +17,12 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import pytest
|
||||
|
||||
from ansible.compat.tests import unittest
|
||||
from ansible.plugins.filter.ipaddr import (ipaddr, _netmask_query, nthhost, next_nth_usable,
|
||||
previous_nth_usable, network_in_usable, network_in_network)
|
||||
try:
|
||||
import netaddr
|
||||
except ImportError:
|
||||
from nose.plugins.skip import SkipTest
|
||||
raise SkipTest("This test requires the `netaddr` python library")
|
||||
netaddr = pytest.importorskip('netaddr')
|
||||
|
||||
|
||||
class TestIpFilter(unittest.TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue