Passed
Push — master ( 9a0bfb...c81a77 )
by Matěj
02:50 queued 11s
created

conftest.remove_generated_reports_in_root()   A

Complexity

Conditions 3

Size

Total Lines 10
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 10
nop 0
dl 0
loc 10
rs 9.9
c 0
b 0
f 0
1
import pytest
2
import os
3
from glob import glob
4
from shutil import rmtree
5
6
7
@pytest.fixture()
8
def remove_generated_reports_in_root():
9
    yield
10
    path = os.getcwd()
11
    pattern = os.path.join(
12
        path, "graph-of-xccdf_org.ssgproject.content_rule_package_abrt_removed*")
13
    for item in glob(pattern):
14
        if not os.path.isdir(item):
15
            continue
16
        rmtree(item)
17