diff options
author | Daniel Watkins <oddbloke@ubuntu.com> | 2020-03-27 11:45:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-27 11:45:45 -0400 |
commit | 1905ff47e9e688d9a48d6132fd45b341f2d66fe4 (patch) | |
tree | 76b146340bb360a7091d0da698423e45d9c10039 /cloudinit/sources/tests | |
parent | 14c1f486cf510bf76ff903710ff892606b71726d (diff) | |
download | vyos-cloud-init-1905ff47e9e688d9a48d6132fd45b341f2d66fe4.tar.gz vyos-cloud-init-1905ff47e9e688d9a48d6132fd45b341f2d66fe4.zip |
sources/tests/test_init: drop use of deprecated inspect.getargspec (#285)
Diffstat (limited to 'cloudinit/sources/tests')
-rw-r--r-- | cloudinit/sources/tests/test_init.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cloudinit/sources/tests/test_init.py b/cloudinit/sources/tests/test_init.py index 541cbbeb..5b3648e9 100644 --- a/cloudinit/sources/tests/test_init.py +++ b/cloudinit/sources/tests/test_init.py @@ -551,9 +551,7 @@ class TestDataSource(CiTestCase): def test_get_hostname_subclass_support(self): """Validate get_hostname signature on all subclasses of DataSource.""" - # Use inspect.getfullargspec when we drop py2.6 and py2.7 - get_args = inspect.getargspec # pylint: disable=W1505 - base_args = get_args(DataSource.get_hostname) # pylint: disable=W1505 + base_args = inspect.getfullargspec(DataSource.get_hostname) # Import all DataSource subclasses so we can inspect them. modules = util.find_modules(os.path.dirname(os.path.dirname(__file__))) for _loc, name in modules.items(): @@ -565,13 +563,13 @@ class TestDataSource(CiTestCase): continue self.assertEqual( base_args, - get_args(child.get_hostname), # pylint: disable=W1505 + inspect.getfullargspec(child.get_hostname), '%s does not implement DataSource.get_hostname params' % child) for grandchild in child.__subclasses__(): self.assertEqual( base_args, - get_args(grandchild.get_hostname), # pylint: disable=W1505 + inspect.getfullargspec(grandchild.get_hostname), '%s does not implement DataSource.get_hostname params' % grandchild) |