winipedia-utils 0.1.4__py3-none-any.whl → 0.1.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -73,7 +73,8 @@ def to_module_name(path: str | Path | ModuleType) -> str:
73
73
  if isinstance(path, ModuleType):
74
74
  return path.__name__
75
75
  if isinstance(path, Path):
76
- rel_path = path.relative_to(".")
76
+ abs_path = path.resolve()
77
+ rel_path = abs_path.relative_to(Path.cwd())
77
78
  if rel_path.suffix:
78
79
  rel_path = rel_path.with_suffix("")
79
80
  # return joined on . parts
@@ -4,12 +4,14 @@ finds all the plugins in the tests directory and the package's testing module
4
4
  and adds them to pytest_plugins. This way defining reusable fixtures is easy.
5
5
  """
6
6
 
7
- from winipedia_utils.consts import PACKAGE_NAME
7
+ import winipedia_utils
8
8
  from winipedia_utils.modules.module import to_module_name, to_path
9
9
 
10
+ package_path = winipedia_utils.__path__[0]
11
+
10
12
  custom_plugin_path = to_path("tests.base.fixtures", is_package=True)
11
13
  package_plugin_path = (
12
- to_path(f"{PACKAGE_NAME}.testing", is_package=True) / custom_plugin_path
14
+ package_path / to_path("testing", is_package=True) / custom_plugin_path
13
15
  )
14
16
 
15
17
  custom_plugin_module_names = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: winipedia-utils
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: A package with many utility functions
5
5
  License: MIT
6
6
  Author: Winipedia
@@ -26,7 +26,7 @@ winipedia_utils/logging/logger.py,sha256=tCcUwAVLVr3Bec7_i-SoKvBPNCJSEmyuvBW2gbq
26
26
  winipedia_utils/modules/__init__.py,sha256=e3CFaC3FhK4ibknFOv1bqOZxA7XeVwmLqWX7oajUm78,51
27
27
  winipedia_utils/modules/class_.py,sha256=RDjal6QYYs9z81DT1mIFrnEhQ9vgN2tCAYN1WWnN24Y,2462
28
28
  winipedia_utils/modules/function.py,sha256=Qn1OPV5dwO-7f3a0f0RpWcrH-E9teGPwldRtwbFYzRM,2551
29
- winipedia_utils/modules/module.py,sha256=iJwUJPhVkxyRjJqHVVWh3GNJFiYf45ZdSfR21puQAmw,12673
29
+ winipedia_utils/modules/module.py,sha256=mxaAsRl02CAq_bTW2HsmzRWoyC9jKNM8Q4xdgdQlgd0,12719
30
30
  winipedia_utils/modules/package.py,sha256=jPI7fcJ5VFWO7nRvjB6cGv_mahx0BUej9qhKARSK_Vk,12485
31
31
  winipedia_utils/oop/__init__.py,sha256=wGjsVwLbTVEQWOfDJvN9nlvC-3NmAi8Doc2xIrm6e78,47
32
32
  winipedia_utils/oop/mixins/__init__.py,sha256=PDK-cJcdRUfDUCz36qQ5pmMW07G133WtN49OpmILGNI,54
@@ -58,10 +58,10 @@ winipedia_utils/testing/tests/base/fixtures/scopes/package.py,sha256=IKOfj6vfyjE
58
58
  winipedia_utils/testing/tests/base/fixtures/scopes/session.py,sha256=Wdesvis8BleXjm93jK99JLX4u9Oy2dY0GIx_3ipXYXo,9624
59
59
  winipedia_utils/testing/tests/base/utils/__init__.py,sha256=mC-8dCkp8xarqkQu2QQLrPjHi6Ww9hcixWdHeQHWeRs,68
60
60
  winipedia_utils/testing/tests/base/utils/utils.py,sha256=dUPDrgAxlfREQb33zz23MfzacLLuwjy2AO-PQQp_aSI,2820
61
- winipedia_utils/testing/tests/conftest.py,sha256=CvLtsr-KhSPzbQYin6SYZQC1Ez3AzIsqCWhuLuXinAs,826
61
+ winipedia_utils/testing/tests/conftest.py,sha256=8409afzrE8LFRuex66XSZjp9N3yaLvele7Oz8FJ5KPw,846
62
62
  winipedia_utils/text/__init__.py,sha256=j2bwtK6kyeHI6SnoBjpRju0C1W2n2paXBDlNjNtaUxA,48
63
63
  winipedia_utils/text/string.py,sha256=1jbBftlgxffGgSlPnQh3aRPIr8XekEwpSenjFCW6JyM,3478
64
- winipedia_utils-0.1.4.dist-info/LICENSE,sha256=3PrKJ2CWNrnyyHaC_r0wPDSukVWgmjOxHr__eQVH7cw,1087
65
- winipedia_utils-0.1.4.dist-info/METADATA,sha256=rIJjj27ZrZ5S0jkXaQPzau4lD3Vx-xKKpST4Y_DPt6A,12384
66
- winipedia_utils-0.1.4.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
67
- winipedia_utils-0.1.4.dist-info/RECORD,,
64
+ winipedia_utils-0.1.5.dist-info/LICENSE,sha256=3PrKJ2CWNrnyyHaC_r0wPDSukVWgmjOxHr__eQVH7cw,1087
65
+ winipedia_utils-0.1.5.dist-info/METADATA,sha256=thDj7ZsiYJwRtJhOZqlBF1o0lzLS7qJEHtXwOMOGknw,12384
66
+ winipedia_utils-0.1.5.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
67
+ winipedia_utils-0.1.5.dist-info/RECORD,,