Completed
Pull Request — master (#27)
by Wojtek
06:24
created

grortir.test.model.processes.factories.TestCallsProcessFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %
Metric Value
dl 0
loc 8
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A test_construct_process_linear() 0 5 1
1
"""Package to test calls_process_factory module."""
2
3
from unittest import TestCase
4
5
from main.model.processes.calls_process import CallsProcess
0 ignored issues
show
Bug introduced by
The name model does not seem to exist in module main.
Loading history...
Configuration introduced by
The import main.model.processes.calls_process could not be resolved.

This can be caused by one of the following:

1. Missing Dependencies

This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.

# .scrutinizer.yml
before_commands:
    - sudo pip install abc # Python2
    - sudo pip3 install abc # Python3
Tip: We are currently not using virtualenv to run pylint, when installing your modules make sure to use the command for the correct version.

2. Missing __init__.py files

This error could also result from missing __init__.py files in your module folders. Make sure that you place one file in each sub-folder.

Loading history...
6
from main.model.processes.factories.calls_process_factory import \
0 ignored issues
show
Bug introduced by
The name model does not seem to exist in module main.
Loading history...
Configuration introduced by
The import main.model.processes.fac...s.calls_process_factory could not be resolved.

This can be caused by one of the following:

1. Missing Dependencies

This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.

# .scrutinizer.yml
before_commands:
    - sudo pip install abc # Python2
    - sudo pip3 install abc # Python3
Tip: We are currently not using virtualenv to run pylint, when installing your modules make sure to use the command for the correct version.

2. Missing __init__.py files

This error could also result from missing __init__.py files in your module folders. Make sure that you place one file in each sub-folder.

Loading history...
7
    CallsProcessFactory
8
9
10
class TestCallsProcessFactory(TestCase):
11
    """Class to test CallsProcessFactory."""
12
13
    def test_construct_process_linear(self):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
14
        tested_object = CallsProcessFactory("linear", 7)
15
        result = tested_object.construct_process()
16
        self.assertIsInstance(result, CallsProcess)
17
        result.edge
0 ignored issues
show
Unused Code introduced by
This statement seems to have no effect and could be removed.

This issue is typically triggered when a function that does not have side-effects is called and the return value is discarded:

class SomeClass:
    def __init__(self):
        self._x = 5

    def squared(self):
        return self._x * self._x

some_class = SomeClass()
some_class.squared()        # Flagged, as the return value is not used
print(some_class.squared()) # Ok
Loading history...
18