yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #41018
[Bug 1515405] [NEW] 'Enum' field tests provide little value
Public bug reported:
There are tests for a number of 'Enum'-type fields found in the below
file:
https://github.com/openstack/nova/blob/5beca6f332044904156b80a4c395a43a000f4413/nova/tests/unit/objects/test_fields.py#L328
However, it makes little sense to test the implementations of the Enum
field when we can (and do) validate the base class. The only reason for
retaining the tests appears to be to maintain versioning, but
'test_objects.py' takes care of this for us. Therefore, we should delete
the tests and thus reduce both the LOC count and the amount of new code
folks need to write when adding new fields.
** Affects: nova
Importance: Undecided
Status: New
** Description changed:
There are tests for a number of 'Enum'-type fields found in the below
file:
https://github.com/openstack/nova/blob/5beca6f332044904156b80a4c395a43a000f4413/nova/tests/unit/objects/test_fields.py#L328
However, it makes little sense to test the implementations of the Enum
field when we can (and do) validate the base class. The only reason for
retaining the tests appears to be to maintain versioning, but
'test_objects.py' takes care of this for us. Therefore, we should delete
- the tests and avoid thus both reducing LOC count and avoiding the need
- for folks to add these in future versions.
+ the tests and thus reduce both the LOC count and the amount of new code
+ folks need to write when adding new fields.
--
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/1515405
Title:
'Enum' field tests provide little value
Status in OpenStack Compute (nova):
New
Bug description:
There are tests for a number of 'Enum'-type fields found in the below
file:
https://github.com/openstack/nova/blob/5beca6f332044904156b80a4c395a43a000f4413/nova/tests/unit/objects/test_fields.py#L328
However, it makes little sense to test the implementations of the Enum
field when we can (and do) validate the base class. The only reason
for retaining the tests appears to be to maintain versioning, but
'test_objects.py' takes care of this for us. Therefore, we should
delete the tests and thus reduce both the LOC count and the amount of
new code folks need to write when adding new fields.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1515405/+subscriptions
Follow ups