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
import pytest
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 cli
def describe_gdm():
@pytest.fixture
def config(tmpdir):
tmpdir.chdir()
path = str(tmpdir.join("gdm.yml"))
open(path, 'w').close()
return path
def describe_edit():
@patch('gdm.system.launch')
def it_launches_the_config(launch, config):
cli.main(['edit'])
expect(launch.mock_calls) == [call(config), call().__bool__()]
def it_exits_when_no_config_found(tmpdir):
with expect.raises(SystemExit):
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.