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

tests.test_empty_output.test_empty_output   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 16
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A test_empty_output() 0 14 1
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