Passed
Push — master ( a392e7...2de2be )
by Simon
01:33
created

test_empty_output()   A

Complexity

Conditions 1

Size

Total Lines 14
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 10
nop 0
dl 0
loc 14
rs 9.9
c 0
b 0
f 0
1
import os
2
import subprocess
3
4
here = os.path.dirname(os.path.abspath(__file__))
5
6
verbose_file = os.path.join(here, "verbose.py")
7
non_verbose_file = os.path.join(here, "non_verbose.py")
8
9
10
def test_empty_output():
11
    output_verbose = subprocess.run(["python", verbose_file], stdout=subprocess.PIPE)
12
    output_non_verbose = subprocess.run(
13
        ["python", non_verbose_file], stdout=subprocess.PIPE
14
    )
15
16
    verbose_str = output_verbose.stdout.decode()
17
    non_verbose_str = output_non_verbose.stdout.decode()
18
19
    print("\n verbose_str \n", verbose_str, "\n")
20
    print("\n non_verbose_str \n", non_verbose_str, "\n")
21
22
    assert verbose_str
23
    assert not non_verbose_str
24