File tree Expand file tree Collapse file tree 11 files changed +37
-11
lines changed
tests/pytest/package_manager Expand file tree Collapse file tree 11 files changed +37
-11
lines changed Original file line number Diff line number Diff line change @@ -10,4 +10,5 @@ requirements-parser
1010defusedxml
1111packageurl-python
1212igraph
13- matplotlib
13+ matplotlib
14+ pytest
Original file line number Diff line number Diff line change 22# -*- coding: utf-8 -*-
33# Copyright (c) 2021 LG Electronics Inc.
44# SPDX-License-Identifier: Apache-2.0
5- import os .path
5+ import os
6+ import pytest
67
78UBUNTU_COMMANDS = [
89 "fosslight_dependency -p tests/test_android -o tests/result/android -m android"
1516WINDOW_COMMANDS = [f"{ DIST_PATH } -p { INPUT_PATH } -o { OUTPUT_PATH } " ]
1617
1718
19+ @pytest .mark .ubuntu
1820def test_ubuntu (run_command ):
1921 for command in UBUNTU_COMMANDS :
2022 return_code , stdout , stderr = run_command (command )
2123 assert return_code == 0 , f"Command failed: { command } \n stdout: { stdout } \n stderr: { stderr } "
2224
2325
26+ @pytest .mark .windows
2427def test_windows (run_command ):
2528 for command in WINDOW_COMMANDS :
2629 return_code , stdout , stderr = run_command (command )
Original file line number Diff line number Diff line change 22# -*- coding: utf-8 -*-
33# Copyright (c) 2021 LG Electronics Inc.
44# SPDX-License-Identifier: Apache-2.0
5+ import pytest
56
67UBUNTU_COMMANDS = [
7- "fosslight_dependency -p tests/test_carthage -o tests/result/carthage -m carthage "
8+ "fosslight_dependency -p tests/test_cocoapods -o tests/result/cocoapods -m cocoapods "
89]
910
1011
12+ @pytest .mark .ubuntu
1113def test_ubuntu (run_command ):
1214 for command in UBUNTU_COMMANDS :
1315 return_code , stdout , stderr = run_command (command )
Original file line number Diff line number Diff line change 33# Copyright (c) 2021 LG Electronics Inc.
44# SPDX-License-Identifier: Apache-2.0
55import os
6+ import pytest
67
78UBUNTU_COMMANDS = [
89 "fosslight_dependency -p tests/test_gradle/jib -o tests/result/gradle" ,
2122]
2223
2324
25+ @pytest .mark .ubuntu
2426def test_ubuntu (run_command ):
2527 for command in UBUNTU_COMMANDS :
2628 return_code , stdout , stderr = run_command (command )
2729 assert return_code == 0 , f"Command failed: { command } \n stdout: { stdout } \n stderr: { stderr } "
2830
2931
32+ @pytest .mark .windows
3033def test_windows (run_command ):
3134 for command in WINDOW_COMMANDS :
3235 return_code , stdout , stderr = run_command (command )
Original file line number Diff line number Diff line change 22# -*- coding: utf-8 -*-
33# Copyright (c) 2021 LG Electronics Inc.
44# SPDX-License-Identifier: Apache-2.0
5+ import pytest
56
67UBUNTU_COMMANDS = [
78 "fosslight_dependency -p tests/test_helm -o tests/result/helm -m helm"
89]
910
1011
12+ @pytest .mark .ubuntu
1113def test_ubuntu (run_command ):
1214 for command in UBUNTU_COMMANDS :
1315 return_code , stdout , stderr = run_command (command )
Original file line number Diff line number Diff line change 22# -*- coding: utf-8 -*-
33# Copyright (c) 2021 LG Electronics Inc.
44# SPDX-License-Identifier: Apache-2.0
5- import os .path
5+ import os
6+ import pytest
67
78UBUNTU_COMMANDS = [
89 "fosslight_dependency -p tests/test_maven1/lombok.maven -o tests/result/maven1" ,
1617WINDOW_COMMANDS = [f"{ DIST_PATH } -p { INPUT_PATH } -o { OUTPUT_PATH } -m maven" ]
1718
1819
20+ @pytest .mark .ubuntu
1921def test_ubuntu (run_command ):
2022 for command in UBUNTU_COMMANDS :
2123 return_code , stdout , stderr = run_command (command )
2224 assert return_code == 0 , f"Command failed: { command } \n stdout: { stdout } \n stderr: { stderr } "
2325
2426
27+ @pytest .mark .windows
2528def test_windows (run_command ):
2629 for command in WINDOW_COMMANDS :
2730 return_code , stdout , stderr = run_command (command )
Original file line number Diff line number Diff line change 22# -*- coding: utf-8 -*-
33# Copyright (c) 2021 LG Electronics Inc.
44# SPDX-License-Identifier: Apache-2.0
5+ import pytest
56
67UBUNTU_COMMANDS = [
78 "fosslight_dependency -p tests/test_npm1 -o tests/result/npm1" ,
89 "fosslight_dependency -p tests/test_npm2 -o tests/result/npm2 -m npm"
910]
1011
1112
13+ @pytest .mark .ubuntu
1214def test_ubuntu (run_command ):
1315 for command in UBUNTU_COMMANDS :
1416 return_code , stdout , stderr = run_command (command )
Original file line number Diff line number Diff line change 22# -*- coding: utf-8 -*-
33# Copyright (c) 2021 LG Electronics Inc.
44# SPDX-License-Identifier: Apache-2.0
5- import os .path
5+ import os
6+ import pytest
67
78UBUNTU_COMMANDS = [
89 "fosslight_dependency -p tests/test_nuget -o tests/result/nuget1" ,
2122]
2223
2324
25+ @pytest .mark .ubuntu
2426def test_ubuntu (run_command ):
2527 for command in UBUNTU_COMMANDS :
2628 return_code , stdout , stderr = run_command (command )
2729 assert return_code == 0 , f"Command failed: { command } \n stdout: { stdout } \n stderr: { stderr } "
2830
2931
32+ @pytest .mark .windows
3033def test_windows (run_command ):
3134 for command in WINDOW_COMMANDS :
3235 return_code , stdout , stderr = run_command (command )
Original file line number Diff line number Diff line change 22# -*- coding: utf-8 -*-
33# Copyright (c) 2021 LG Electronics Inc.
44# SPDX-License-Identifier: Apache-2.0
5- import os .path
5+ import os
6+ import pytest
67
78UBUNTU_COMMANDS = [
89 "fosslight_dependency -p tests/test_pub -o tests/result/pub" ,
2223]
2324
2425
26+ @pytest .mark .ubuntu
2527def test_ubuntu (run_command ):
2628 for command in UBUNTU_COMMANDS :
2729 return_code , stdout , stderr = run_command (command )
2830 assert return_code == 0 , f"Command failed: { command } \n stdout: { stdout } \n stderr: { stderr } "
2931
3032
33+ @pytest .mark .windows
3134def test_windows (run_command ):
3235 for command in WINDOW_COMMANDS :
3336 return_code , stdout , stderr = run_command (command )
Original file line number Diff line number Diff line change 22# -*- coding: utf-8 -*-
33# Copyright (c) 2021 LG Electronics Inc.
44# SPDX-License-Identifier: Apache-2.0
5- import os .path
5+ import os
6+ import pytest
67
78UBUNTU_COMMANDS = [
89 "fosslight_dependency -p tests/test_pypi -o tests/result/pypi" ,
1718WINDOW_COMMANDS = [f"{ DIST_PATH } -p { INPUT_PATH } -o { OUTPUT_PATH } " ]
1819
1920
21+ @pytest .mark .ubuntu
2022def test_ubuntu (run_command ):
2123 for command in UBUNTU_COMMANDS :
2224 return_code , stdout , stderr = run_command (command )
2325 assert return_code == 0 , f"Command failed: { command } \n stdout: { stdout } \n stderr: { stderr } "
2426
2527
28+ @pytest .mark .windows
2629def test_windows (run_command ):
2730 for command in WINDOW_COMMANDS :
2831 return_code , stdout , stderr = run_command (command )
You can’t perform that action at this time.
0 commit comments