Completed
Push — develop ( fea62d...40913a )
by Jace
02:59
created

it_displays_help_information()   A

Complexity

Conditions 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
c 0
b 0
f 0
dl 0
loc 5
rs 9.4285
1
# pylint: disable=unused-variable,expression-not-assigned,redefined-outer-name
2
3
import sys
4
5
import pytest
6
import scripttest
7
from expecter import expect
8
9
10
@pytest.fixture
11
def env(tmpdir):
12
    path = str(tmpdir.join("test"))
13
    env = scripttest.TestFileEnvironment(path)
14
    return env
15
16
17
@pytest.fixture
18
def cli(env):
19
    prog = sys.executable, '-m', 'osmerge'
20
    return lambda *args: env.run(*prog, *args, expect_error=True)
0 ignored issues
show
introduced by
invalid syntax
Loading history...
21
22
23
def describe_cli():
24
25
    def it_displays_help_information(cli):
26
        cmd = cli('--help')
27
28
        expect(cmd.returncode) == 0
29
        expect(cmd.stdout).contains("Usage: ")
30
31
    def it_displays_version_information(cli):
32
        cmd = cli('--version')
33
34
        expect(cmd.returncode) == 0
35
        expect(cmd.stdout or cmd.stderr).contains("OSMerge v0.")
36