File suite.py
has 293 lines of code (exceeds 250 allowed). Consider refactoring. Wontfix
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
Function _get_test_variants
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def _get_test_variants(self):
def add_variant(runnable, variant):
runnable = deepcopy(runnable)
runnable.variant = dump_variant(variant)
runnable_with_variant.append(runnable)
- 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
TestSuite
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class TestSuite:
def __init__(
self,
name,
config=None,
Function from_config
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def from_config(cls, config, name=None, job_config=None):
"""Helper method to create a TestSuite from config dicts.
This is different from the TestSuite() initialization because here we
are assuming that you need some help to build the test suite. Avocado
- 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 __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Wontfix
def __init__(
Function variants
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def variants(self):
if self._variants is None:
variants = Varianter()
if not variants.is_parsed():
try:
- 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 resolutions_to_runnables
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def resolutions_to_runnables(resolutions, config):
"""
Transforms resolver resolutions into runnables suitable for a suite
A resolver resolution
- 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 _get_tags_stats_from_nrunner
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _get_tags_stats_from_nrunner(self):
stats = {}
for runnable in self.tests:
if runnable is None:
continue
- 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"