calplus/tests/unit/conf/test_conf.py
Function test_list_opts
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
def test_list_opts(self):
for group, opt_list in opts.list_opts():
if isinstance(group, six.string_types):
self.assertEqual(group, 'DEFAULT')
else:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function test_load_config_file_to_realize_all_driver
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
def test_load_config_file_to_realize_all_driver(self):
CONF(['--config-file',
'calplus/tests/fake_config_file.conf'])
# TODO: Maybe we need remove example group,
# such as: openstack and amazon
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
TODO found Open
Open
# TODO: Maybe we need remove example group,
- Exclude checks