Skip to content

Commit ba9f209

Browse files
committed
Resolve not found exception
Signed-off-by: yongjunhong <[email protected]>
1 parent 7cb322d commit ba9f209

File tree

7 files changed

+8
-6
lines changed

7 files changed

+8
-6
lines changed

tests/pytest/package_manager/test_android.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"fosslight_dependency -p tests/test_android -o tests/result/android -m android"
99
]
1010

11-
DIST_PATH = os.path.join(os.path.abspath(os.sep), "dist", "cli.exe")
11+
DIST_PATH = os.path.join(os.environ.get("TOX_PATH"), "dist", "cli.exe")
1212
INPUT_PATH = os.path.join("tests", "test_android", "sunflower")
1313
OUTPUT_PATH = os.path.join("tests", "result", "android")
1414

tests/pytest/package_manager/test_gradle.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"fosslight_dependency -p tests/test_gradle2 -o tests/result/gradle2"
1010
]
1111

12-
DIST_PATH = os.path.join(os.path.abspath(os.sep), "dist", "cli.exe")
12+
DIST_PATH = os.path.join(os.environ.get("TOX_PATH"), "dist", "cli.exe")
1313
INPUT_PATH = os.path.join("tests", "test_gradle", "jib")
1414
OUTPUT_PATH = os.path.join("tests", "result", "gradle")
1515
INPUT_PATH2 = os.path.join("tests", "test_gradle2")
@@ -20,6 +20,7 @@
2020
f"{DIST_PATH} -p {INPUT_PATH2} -o {OUTPUT_PATH2} -m gradle",
2121
]
2222

23+
2324
def test_ubuntu(run_command):
2425
for command in UBUNTU_COMMANDS:
2526
return_code, stdout, stderr = run_command(command)

tests/pytest/package_manager/test_maven.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"fosslight_dependency -p tests/test_maven2 -o tests/result/maven2"
1010
]
1111

12-
DIST_PATH = os.path.join(os.path.abspath(os.sep), "dist", "cli.exe")
12+
DIST_PATH = os.path.join(os.environ.get("TOX_PATH"), "dist", "cli.exe")
1313
INPUT_PATH = os.path.join("tests", "test_maven2")
1414
OUTPUT_PATH = os.path.join("tests", "result", "maven2")
1515

tests/pytest/package_manager/test_nuget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"fosslight_dependency -p tests/test_nuget2 -o tests/result/nuget2"
1010
]
1111

12-
DIST_PATH = os.path.join(os.path.abspath(os.sep), "dist", "cli.exe")
12+
DIST_PATH = os.path.join(os.environ.get("TOX_PATH"), "dist", "cli.exe")
1313
INPUT_PATH = os.path.join("tests", "test_nuget")
1414
OUTPUT_PATH = os.path.join("tests", "result", "nuget1")
1515
INPUT_PATH2 = os.path.join("tests", "test_nuget2")

tests/pytest/package_manager/test_pub.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"fosslight_dependency -p tests/test_exclude -e requirements.txt -o tests/result/exclude"
1010
]
1111

12-
DIST_PATH = os.path.join(os.path.abspath(os.sep), "dist", "cli.exe")
12+
DIST_PATH = os.path.join(os.environ.get("TOX_PATH"), "dist", "cli.exe")
1313
INPUT_PATH = os.path.join("tests", "test_pub")
1414
OUTPUT_PATH = os.path.join("tests", "result", "pub")
1515
INPUT_PATH2 = os.path.join("tests", "test_exclude")

tests/pytest/package_manager/test_pypi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"fosslight_dependency -p tests/test_multi_pypi_npm -o tests/result/multi_pypi_npm -f opossum"
1111
]
1212

13-
DIST_PATH = os.path.join(os.path.abspath(os.sep), "dist", "cli.exe")
13+
DIST_PATH = os.path.join(os.environ.get("TOX_PATH"), "dist", "cli.exe")
1414
INPUT_PATH = os.path.join("tests", "test_pypi")
1515
OUTPUT_PATH = os.path.join("tests", "result", "pypi")
1616

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ toxworkdir = {toxinidir}/tests/
99
install_command = pip install {opts} {packages}
1010
setenv =
1111
PYTHONPATH=.
12+
TOX_PATH={toxinidir}
1213
allowlist_externals =
1314
{toxinidir}/dist/cli
1415
{toxinidir}\dist\cli.exe

0 commit comments

Comments
 (0)