Completed
Push — status ( 924687...ef6f36 )
by Michael
17:16 queued 07:15
created

test_status()   B

Complexity

Conditions 3

Size

Total Lines 24

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
cc 3
c 3
b 0
f 0
dl 0
loc 24
rs 8.9713
1
import textwrap
2
import os
3
4
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...
5
from semantic_version import Version
0 ignored issues
show
Configuration introduced by
The import semantic_version 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.commands import status
8
9
10
def test_status(
11
    capsys,
12
    git_repo_with_merge_commit,
13
    with_auth_token_envvar
14
):
15
16
    git('tag', '0.0.2')
17
18
    status.status()
19
20
    expected_output = textwrap.dedent(
21
        """\
22
        Indexing repository...
23
        Looking for Github auth token in the environment...
24
        Repository: michaeljoseph/test_app...
25
        Latest Version...
26
        0.0.2
27
        Changes...
28
        0 changes found since 0.0.2
29
        """
30
    )
31
    out, err = capsys.readouterr()
32
    assert expected_output == out
33
    assert '' == err
34