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,singleton-comparison
import pytest
pytest
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 expecter import expect
expecter
from coveragespace.cache import Cache
def describe_cache():
# pylint: disable=protected-access
@pytest.fixture
def cache():
return Cache()
def describe_load():
def it_loads_previous_results(cache):
cache._data['value'] = "saved"
cache._store()
expect(Cache.load()._data['value']) == "saved"
def describe_match():
def it_hits_with_existing_data(cache):
cache._data['abc'] = 123
expect(cache.match('abc', 123)) == True
def it_misses_with_no_data(cache):
cache._data.pop('abc', None)
expect(cache.match('abc', 123)) == False
def it_caches_requests(cache):
cache.match('abc', 123)