Skip to content

Commit 5287111

Browse files
committed
[cdd/tests/test_shared/test_pkg_utils.py] Backtrack how test should look for get_python_lib on GitHub Actions
1 parent 94a3ffa commit 5287111

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

cdd/tests/test_shared/test_pkg_utils.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
""" Tests for pkg utils """
22

3+
from os import path
34
from site import getsitepackages
45
from unittest import TestCase
56

@@ -17,7 +18,18 @@ def test_relative_filename(self) -> None:
1718

1819
def test_get_python_lib(self) -> None:
1920
"""Tests that `get_python_lib` works"""
20-
self.assertEqual(getsitepackages()[0], get_python_lib())
21+
site_packages = getsitepackages()[0]
22+
python_lib = get_python_lib()
23+
if site_packages != python_lib:
24+
site_packages = path.dirname(path.dirname(site_packages))
25+
self.assertEqual(
26+
(
27+
site_packages
28+
if site_packages == python_lib
29+
else path.join(site_packages, "python3", "dist-packages")
30+
),
31+
python_lib,
32+
)
2133

2234

2335
unittest_main()

0 commit comments

Comments
 (0)