for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
# pylint: disable=missing-docstring,unused-variable,unused-argument,expression-not-assigned
from mock import patch, Mock
mock
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
import pytest
pytest
from expecter import expect
expecter
from coveragespace.plugins import get_coverage
class MockCoverage(Mock):
@staticmethod
def report(*args, **kwargs):
return 42.456
def describe_get_coverage():
@pytest.fixture
def coveragepy_data(tmpdir):
cwd = tmpdir.chdir()
with open("foobar.py", 'w') as stream:
pass
with open(".coverage", 'w') as stream:
stream.write("""
!coverage.py: This is a private format, don\'t read it directly!
{"arcs":{"foobar.py": [[-1, 3]]}}
""".strip())
@patch('coverage.Coverage', MockCoverage)
def it_supports_coveragepy(coveragepy_data):
expect(get_coverage()) == 42.5
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.
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.