1 | # pylint: disable=unused-variable,expression-not-assigned,singleton-comparison |
||
2 | |||
3 | from mock import patch, Mock |
||
0 ignored issues
–
show
|
|||
4 | from expecter import expect |
||
0 ignored issues
–
show
The import
expecter could not be resolved.
This can be caused by one of the following: 1. Missing DependenciesThis 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
Tip: We are currently not using virtualenv to run pylint, when installing your modules make sure to use
the command for the correct version.
2. Missing __init__.py filesThis error could also result from missing
Loading history...
|
|||
5 | |||
6 | from coveragespace import cli |
||
7 | |||
8 | |||
9 | def describe_call(): |
||
10 | |||
11 | @patch('coveragespace.cache.Cache.get', Mock()) |
||
12 | def it_handles_invalid_response(): |
||
13 | expect(cli.call('slug', 'metric', 42)) == False |
||
14 | |||
15 | @patch('coveragespace.cache.Cache.get', Mock(return_value=None)) |
||
16 | @patch('coveragespace.cache.Cache.set', Mock(return_value=None)) |
||
17 | @patch('time.sleep', Mock()) |
||
18 | @patch('requests.put') |
||
19 | def it_retries_500s(requests_put): |
||
20 | requests_put.return_value = Mock(status_code=500) |
||
21 | |||
22 | cli.call('slug', 'metric', 42) |
||
23 | |||
24 | expect(requests_put.call_count) == 3 |
||
25 |
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.