Completed
Push — develop ( d85607...94bf94 )
by Jace
02:17
created

describe_cli()   A

Complexity

Conditions 3

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A it_returns_information() 0 5 1
A describe_help() 0 7 2
1
# pylint: disable=redefined-outer-name,unused-variable,expression-not-assigned
2
3
import os
4
import sys
5
6
import pytest
0 ignored issues
show
Configuration introduced by
The import pytest 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...
7
import scripttest
0 ignored issues
show
Configuration introduced by
The import scripttest 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...
8
from expecter import expect
0 ignored issues
show
Configuration introduced by
The import expecter 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...
9
import six
10
11
12
@pytest.fixture
13
def env(tmpdir):
14
    path = str(tmpdir.join('test'))
15
    env = scripttest.TestFileEnvironment(path)
16
    return env
17
18
19
def cli(env, *args):
20
    prog = os.path.join(os.path.dirname(sys.executable), 'verchew')
21
    cmd = env.run(prog, *args, expect_error=True)
22
    six.print_(cmd)
23
    return cmd
24
25
26
def describe_cli():
27
28
    def describe_help():
29
30
        def it_returns_information(env):
31
            cmd = cli(env, '--help')
32
33
            expect(cmd.returncode) == 0
34
            expect(cmd.stdout).contains("usage: verchew")
35