for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
# pylint: disable=unused-variable,expression-not-assigned
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.
from unittest.mock import patch, call, Mock
from expecter import expect
expecter
This can be caused by one of the following:
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
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.
__init__.py
from gdm import system
def describe_launch():
@patch('platform.system', Mock(return_value="Windows"))
@patch('gdm.system._launch_windows')
def it_opens_files(startfile):
system.launch("fake/path")
expect(startfile.mock_calls) == [call("fake/path")]
@patch('platform.system', Mock(return_value="fake"))
def it_raises_an_exception_when_platform_is_unknown():
with expect.raises(RuntimeError):
system.launch(None)
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.