Completed
Push — master ( 2d5fd3...e2acfa )
by Klaus
01:03
created

tests.test_example()   B

Complexity

Conditions 6

Size

Total Lines 14

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 6
dl 0
loc 14
rs 8
1
#!/usr/bin/env python
2
# coding=utf-8
3
from __future__ import division, print_function, unicode_literals
4
5
6
# example_test will be parametrized by the test generation hook in conftest.py
7
def notest_example(capsys, example_test):
8
    ex, call, out = example_test
9
    ex.run_commandline(call)
10
    captured_out, captured_err = capsys.readouterr()
11
    captured_out = captured_out.split('\n')
12
    captured_err = captured_err.split('\n')
13
    for out_line in out:
14
        assert out_line in [captured_out[0], captured_err[0]]
15
        if out_line == captured_out[0]:
16
            captured_out.pop(0)
17
        else:
18
            captured_err.pop(0)
19
    assert captured_out == ['']
20
    assert captured_err == ['']
21