Conditions | 3 |
Total Lines | 8 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | # Copyright 2022, Red Hat, Inc. |
||
12 | @pytest.fixture() |
||
13 | def remove_generated_file(): |
||
14 | # Removes all files in /tmp which name starts with oscap-report-tests_* |
||
15 | yield |
||
16 | pattern = str(Path(tempfile.gettempdir()) / "oscap-report-tests_*") |
||
17 | for item in glob(pattern): |
||
18 | if not os.path.isdir(item): |
||
19 | os.remove(item) |
||
20 |