Completed
Push — stage ( 901070...369057 )
by Michael
09:53
created

test_no_config()   B

Complexity

Conditions 5

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 5
c 2
b 0
f 0
dl 0
loc 5
rs 8.5454
1
from os.path import exists
2
3
import click
0 ignored issues
show
Configuration introduced by
The import click could not be resolved.

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.

# .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 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.

Loading history...
4
from click.testing import CliRunner
0 ignored issues
show
Configuration introduced by
The import click.testing could not be resolved.

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.

# .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 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.

Loading history...
5
from plumbum.cmd import git
0 ignored issues
show
Configuration introduced by
The import plumbum.cmd could not be resolved.

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.

# .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 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.

Loading history...
6
7
from changes import config
8
from changes.config import Config
9
10
11
# def test_no_config():
12
#     with CliRunner().isolated_filesystem():
13
#         assert not exists('.changes.toml')
14
#         assert config.project_config() == config.DEFAULTS
15
#         assert exists('.changes.toml')
16
#
17
#
18
# def test_existing_config():
19
#     with CliRunner().isolated_filesystem():
20
#         with click.open_file('.changes.toml', 'w') as f:
21
#             f.write(
22
#                 '[tool.changes]\n'
23
#                 'project_name = "foo"\n'
24
#             )
25
#
26
#         expected_config = {'tool': {'changes': {'project_name': 'foo'}}}
27
#         assert expected_config == config.project_config()
28
#
29
#
30
# def test_malformed_config_returns_dict():
31
#
32
#     with CliRunner().isolated_filesystem():
33
#         with click.open_file('.changes.toml', 'w') as f:
34
#             f.write('something\n\n-another thing\n')
35
#             assert config.project_config() == {}
36
#
37
#
38
# def test_store_settings():
39
#     with CliRunner().isolated_filesystem():
40
#         config.store_settings({'foo':'bar'})
41
#         assert exists('.changes.toml')
42
#         assert config.project_config() == {'foo':'bar'}
43
#
44
#
45
# def test_parsed_repo_url():
46
#     with CliRunner().isolated_filesystem():
47
#         git('init')
48
#         git('remote', 'add', 'origin', 'https://github.com/michaeljoseph/test_app.git')
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (89/79).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
49
#
50
#         context = Config(
51
#             'something', True, True, True,
52
#             'requirements.txt', '0.0.2', '0.0.1',
53
#             'https://github.com/someuser/test_app', None
54
#         )
55