Completed
Push — develop ( 27219e...2e9d61 )
by Jace
12s
created

it_displays_version_information()   A

Complexity

Conditions 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
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 it_displays_help_information(env):
29
        cmd = cli(env, '--help')
30
31
        expect(cmd.returncode) == 0
32
        expect(cmd.stdout).contains("usage: verchew")
33
34
    def it_displays_version_information(env):
35
        cmd = cli(env, '--version')
36
37
        expect(cmd.returncode) == 0
38
        expect(cmd.stdout or cmd.stderr).contains("verchew v0.")
39