← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1699927] [NEW] Misuse of assertIsNone in tests

 

Public bug reported:

There are some misuse of assertIsNone.

self.assertIsNone(None, XXXX)

This check always passed, so it is useless.

https://github.com/openstack/nova/blob/6386692b4b01337569eab4cd6c2f0219d0fe1e74/nova/tests/unit/conductor/test_conductor.py#L1484
https://github.com/openstack/nova/blob/6386692b4b01337569eab4cd6c2f0219d0fe1e74/nova/tests/unit/virt/libvirt/test_migration.py#L47
https://github.com/openstack/nova/blob/6386692b4b01337569eab4cd6c2f0219d0fe1e74/nova/tests/functional/wsgi/test_servers.py#L74
https://github.com/openstack/nova/blob/6386692b4b01337569eab4cd6c2f0219d0fe1e74/nova/tests/functional/wsgi/test_servers.py#L75
https://github.com/openstack/nova/blob/6386692b4b01337569eab4cd6c2f0219d0fe1e74/nova/tests/functional/wsgi/test_servers.py#L104
https://github.com/openstack/nova/blob/6386692b4b01337569eab4cd6c2f0219d0fe1e74/nova/tests/functional/wsgi/test_servers.py#L105

** Affects: nova
     Importance: Undecided
     Assignee: Takashi NATSUME (natsume-takashi)
         Status: In Progress


** Tags: testing

** Changed in: nova
       Status: New => In Progress

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1699927

Title:
  Misuse of assertIsNone in tests

Status in OpenStack Compute (nova):
  In Progress

Bug description:
  There are some misuse of assertIsNone.

  self.assertIsNone(None, XXXX)

  This check always passed, so it is useless.

  https://github.com/openstack/nova/blob/6386692b4b01337569eab4cd6c2f0219d0fe1e74/nova/tests/unit/conductor/test_conductor.py#L1484
  https://github.com/openstack/nova/blob/6386692b4b01337569eab4cd6c2f0219d0fe1e74/nova/tests/unit/virt/libvirt/test_migration.py#L47
  https://github.com/openstack/nova/blob/6386692b4b01337569eab4cd6c2f0219d0fe1e74/nova/tests/functional/wsgi/test_servers.py#L74
  https://github.com/openstack/nova/blob/6386692b4b01337569eab4cd6c2f0219d0fe1e74/nova/tests/functional/wsgi/test_servers.py#L75
  https://github.com/openstack/nova/blob/6386692b4b01337569eab4cd6c2f0219d0fe1e74/nova/tests/functional/wsgi/test_servers.py#L104
  https://github.com/openstack/nova/blob/6386692b4b01337569eab4cd6c2f0219d0fe1e74/nova/tests/functional/wsgi/test_servers.py#L105

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1699927/+subscriptions


Follow ups