Skip to content

Commit 978264f

Browse files
committed
[cdd/shared/pkg_utils.py] Add get_python_lib to __all__ ; [cdd/tests/test_shared/test_pkg_utils.py] Fix test_get_python_lib ; [cdd/__init__.py] Bump version
1 parent 7a004ea commit 978264f

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

cdd/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from logging import getLogger as get_logger
1010

1111
__author__ = "Samuel Marks" # type: str
12-
__version__ = "0.0.99rc40" # type: str
12+
__version__ = "0.0.99rc41" # type: str
1313
__description__ = (
1414
"Open API to/fro routes, models, and tests. "
1515
"Convert between docstrings, classes, methods, argparse, pydantic, and SQLalchemy."

cdd/shared/pkg_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,4 @@ def relative_filename(filename, remove_hints=tuple()):
120120
)
121121

122122

123-
__all__ = ["relative_filename"] # type: list[str]
123+
__all__ = ["get_python_lib", "relative_filename"] # type: list[str]

cdd/tests/test_shared/test_pkg_utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
from functools import partial
44
from operator import eq
55
from os import path
6-
from platform import platform
76
from site import getsitepackages
8-
from unittest import TestCase, skipIf
7+
from unittest import TestCase
98

109
from cdd.shared.pkg_utils import get_python_lib, relative_filename
1110
from cdd.tests.utils_for_tests import unittest_main
@@ -19,7 +18,6 @@ def test_relative_filename(self) -> None:
1918
expect: str = "gaffe"
2019
self.assertEqual(relative_filename(expect), expect)
2120

22-
@skipIf(platform == "win32", "Skip hack for sitepackages check on Windows")
2321
def test_get_python_lib(self) -> None:
2422
"""Tests that `get_python_lib` works"""
2523
python_lib: str = get_python_lib()
@@ -31,6 +29,7 @@ def test_get_python_lib(self) -> None:
3129
lambda two_dir_above: (
3230
site_packages,
3331
two_dir_above,
32+
path.join(two_dir_above, "Lib", "site-packages"),
3433
path.join(two_dir_above, "python3", "dist-packages"),
3534
)
3635
)(path.dirname(path.dirname(site_packages))),

0 commit comments

Comments
 (0)