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:
Toshio Kuratomi 2017-11-30 14:04:09 -08:00 committed by GitHub
parent c35a562345
commit e499bccbaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 19 additions and 23 deletions

View file

@ -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):