Skip to content

Commit

Permalink
[cdd/shared/pkg_utils.py] Add get_python_lib to __all__ ; [cdd/te…
Browse files Browse the repository at this point in the history
…sts/test_shared/test_pkg_utils.py] Fix `test_get_python_lib` ; [cdd/__init__.py] Bump version
  • Loading branch information
SamuelMarks committed Mar 15, 2024
1 parent 10c9b7b commit 86c08a4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cdd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from logging import getLogger as get_logger

__author__ = "Samuel Marks" # type: str
__version__ = "0.0.99rc40" # type: str
__version__ = "0.0.99rc41" # type: str
__description__ = (
"Open API to/fro routes, models, and tests. "
"Convert between docstrings, classes, methods, argparse, pydantic, and SQLalchemy."
Expand Down
2 changes: 1 addition & 1 deletion cdd/shared/pkg_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ def relative_filename(filename, remove_hints=tuple()):
)


__all__ = ["relative_filename"] # type: list[str]
__all__ = ["get_python_lib", "relative_filename"] # type: list[str]
5 changes: 2 additions & 3 deletions cdd/tests/test_shared/test_pkg_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
from functools import partial
from operator import eq
from os import path
from platform import platform
from site import getsitepackages
from unittest import TestCase, skipIf
from unittest import TestCase

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

@skipIf(platform == "win32", "Skip hack for sitepackages check on Windows")
def test_get_python_lib(self) -> None:
"""Tests that `get_python_lib` works"""
python_lib: str = get_python_lib()
Expand All @@ -31,6 +29,7 @@ def test_get_python_lib(self) -> None:
lambda two_dir_above: (
site_packages,
two_dir_above,
path.join(two_dir_above, "Lib", "site-packages"),
path.join(two_dir_above, "python3", "dist-packages"),
)
)(path.dirname(path.dirname(site_packages))),
Expand Down

0 comments on commit 86c08a4

Please sign in to comment.