forked from fosslight/fosslight_dependency_scanner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconftest.py
40 lines (34 loc) · 998 Bytes
/
conftest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2021 LG Electronics Inc.
# SPDX-License-Identifier: Apache-2.0
import os
import shutil
import pytest
set_up_directories = [
"tests/result/android",
"tests/result/cocoapods",
"tests/result/exclude",
"tests/result/gradle",
"tests/result/gradle2",
"tests/result/helm",
"tests/result/maven1",
"tests/result/maven2",
"tests/result/multi_pypi_npm",
"tests/result/npm1",
"tests/result/npm2",
"tests/result/nuget1",
"tests/result/nuget2",
"tests/result/pub",
"tests/result/pypi"
]
remove_directories = set_up_directories
@pytest.fixture(scope="session", autouse=True)
def setup_test_result_dir_and_teardown():
print("==============setup==============")
for directory in set_up_directories:
os.makedirs(directory, exist_ok=True)
yield
print("==============tearDown==============")
for directory in remove_directories:
shutil.rmtree(directory)