for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
# pylint: disable=unused-variable,expression-not-assigned,misplaced-comparison-constant,singleton-comparison
from pathlib import Path
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 memegen.domain import Font
def describe_font():
@pytest.fixture
def font():
return Font(Path('mock_dir', 'FooBar.otf'))
def describe_str():
def is_based_on_name(font):
expect(str(font)) == 'foobar'
def describe_bool():
def is_based_on_default(font):
expect(bool(font)) == True
font.DEFAULT = 'foobar'
expect(bool(font)) == False
def describe_name():
def is_derived_from_filename(font):
expect(font.name) == 'foobar'
def it_replaces_underscores(font):
font.path = Path('a_b')
expect(font.name) == 'a-b'