winipedia-utils 0.2.3__py3-none-any.whl → 0.2.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.

Potentially problematic release.


This version of winipedia-utils might be problematic. Click here for more details.

@@ -81,7 +81,14 @@ def _add_configurations_to_pyproject_toml() -> None:
81
81
  toml = laod_pyproject_toml()
82
82
  actual_tool_dict = toml.get("tool", None)
83
83
  if actual_tool_dict is None:
84
- actual_tool_dict = toml["tool"] = {}
84
+ # add tool section
85
+ toml.add("tool", tomlkit.table())
86
+
87
+ actual_tool_dict = toml.get("tool", None)
88
+ if actual_tool_dict is None:
89
+ msg = "tool section is None after adding it"
90
+ raise ValueError(msg)
91
+
85
92
  # update the toml dct and dump it but only update the tools specified not all tools
86
93
  for tool, config in expected_tool_dict.items():
87
94
  # if tool section already exists skip it
@@ -38,6 +38,8 @@ from winipedia_utils.testing.convention import (
38
38
  from winipedia_utils.testing.tests.base.utils.utils import (
39
39
  _conftest_content_is_correct,
40
40
  _get_conftest_content,
41
+ _get_test_0_content,
42
+ _test_0_content_is_correct,
41
43
  )
42
44
 
43
45
 
@@ -73,6 +75,10 @@ def create_tests_base() -> None:
73
75
  if not _conftest_content_is_correct(conftest_path):
74
76
  conftest_path.write_text(_get_conftest_content())
75
77
 
78
+ test_0_path = tests_path / "test_0.py"
79
+ if not _test_0_content_is_correct(test_0_path):
80
+ test_0_path.write_text(_get_test_0_content())
81
+
76
82
 
77
83
  def create_tests_for_src_package() -> None:
78
84
  """Create test files for all modules in the source package.
@@ -80,3 +80,35 @@ def _conftest_content_is_correct(conftest_path: Path) -> bool:
80
80
  if not conftest_path.exists():
81
81
  return False
82
82
  return conftest_path.read_text().startswith(_get_conftest_content())
83
+
84
+
85
+ def _get_test_0_content() -> str:
86
+ """Get the content for a test_0.py file when using winipedia_utils."""
87
+ return '''
88
+ """Contains an empty test."""
89
+
90
+ import pytest
91
+
92
+
93
+ @pytest.mark.skip(reason="Can not test a test")
94
+ def test_0() -> None:
95
+ """Empty test.
96
+
97
+ Exists so that when no tests are written yet the base fixtures are executed.
98
+ """
99
+ '''.strip()
100
+
101
+
102
+ def _test_0_content_is_correct(test_0_path: Path) -> bool:
103
+ """Check if the test_0.py file has the correct content.
104
+
105
+ Args:
106
+ test_0_path: The path to the test_0.py file
107
+
108
+ Returns:
109
+ True if the test_0.py file exists and has the correct content, False otherwise
110
+
111
+ """
112
+ if not test_0_path.exists():
113
+ return False
114
+ return test_0_path.read_text().startswith(_get_test_0_content())
@@ -0,0 +1,12 @@
1
+ """Contains an empty test."""
2
+
3
+ from winipedia_utils.testing.assertions import assert_with_msg
4
+
5
+
6
+ def test_0() -> None:
7
+ """Empty test.
8
+
9
+ Exists so that when no tests are written yet the base fixtures are executed.
10
+ """
11
+ always_true = True
12
+ assert_with_msg(always_true, "This should not raise")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: winipedia-utils
3
- Version: 0.2.3
3
+ Version: 0.2.5
4
4
  Summary: A package with many utility functions
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -35,7 +35,7 @@ winipedia_utils/os/__init__.py,sha256=WSLt7tb6HqWRlCGGIEwRfVksF0sLJNeEW3iZeJhGWk
35
35
  winipedia_utils/os/os.py,sha256=CXPVnagfj3dXlc8OIv1DirJpin8oaGXWetnmx2lULE4,1831
36
36
  winipedia_utils/projects/__init__.py,sha256=6oTiSlUMAwO5xnH4SGVnvspzKcxrxo9kn1L4xkjq1p8,53
37
37
  winipedia_utils/projects/poetry/__init__.py,sha256=0yNMuu9KmM19od4VBxBV3HLK-RdCsa0e2Zhg33J7RmQ,60
38
- winipedia_utils/projects/poetry/config.py,sha256=t69GnAzMx8IsF_HImGiNBGZu3lQnTR3U0QYhL06IhqY,3075
38
+ winipedia_utils/projects/poetry/config.py,sha256=kKhnhLDzXqdmmsAlNSRUWQi714dZWfk2fykMLbVlEFs,3270
39
39
  winipedia_utils/projects/poetry/poetry.py,sha256=QoQ-b8NgMiWaqq85gs2HZh_436VpNqKzGogrWPS5DrU,965
40
40
  winipedia_utils/projects/project.py,sha256=2nz1Hh51A-shjgdPCgiDw-ODrVtOtiHEHQnMPjAJZ-A,1587
41
41
  winipedia_utils/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
@@ -57,7 +57,7 @@ winipedia_utils/setup.py,sha256=F4NneO0wVTf7JCXLorWjTOdJl36N5fLSksoWMe4p86o,1650
57
57
  winipedia_utils/testing/__init__.py,sha256=kXhB5xw02ec5xpcW_KV--9CBKdyCjnuR-NZzAJ5tq0g,51
58
58
  winipedia_utils/testing/assertions.py,sha256=0JF4mqVTnLQ1qkAL_FuTwyN_idr00rvVlta7aDdnUXA,851
59
59
  winipedia_utils/testing/convention.py,sha256=NxC_hYaUXshsa6LL6nQoEEKpTzC1KwTloKL8aS2gUPI,5010
60
- winipedia_utils/testing/create_tests.py,sha256=sA1RhmwWWOVVgV5RdrdjoNXGa8ZB_LdGbNhvWsYpHhw,9968
60
+ winipedia_utils/testing/create_tests.py,sha256=WYxpLFmdLsWjJDxLitmWPcbfv5LDSKp2GsuNuLkzg2A,10181
61
61
  winipedia_utils/testing/fixtures.py,sha256=e0ax1n1zqzmLawA26k0EtNa3rYSMu10lMNVRjBuIGMs,1061
62
62
  winipedia_utils/testing/tests/__init__.py,sha256=kL-1O6lAO5j4JPOqPdi3dHdbOQ_UXcgPFppj82HhrRU,57
63
63
  winipedia_utils/testing/tests/base/__init__.py,sha256=dBH1yfONmqUC49zshS6BJ4ZgEcw7iFGoFCqRmU7Vhrw,62
@@ -70,11 +70,12 @@ winipedia_utils/testing/tests/base/fixtures/scopes/module.py,sha256=V0H9WFrdSV7u
70
70
  winipedia_utils/testing/tests/base/fixtures/scopes/package.py,sha256=IKOfj6vfyjEQdRV5cJoPRQvALmePpGxWkGy23di00-w,309
71
71
  winipedia_utils/testing/tests/base/fixtures/scopes/session.py,sha256=g7B9-OnC06Qx46zeB6HOG-YKrK6aaYrpa8RkktnC6h0,10422
72
72
  winipedia_utils/testing/tests/base/utils/__init__.py,sha256=mC-8dCkp8xarqkQu2QQLrPjHi6Ww9hcixWdHeQHWeRs,68
73
- winipedia_utils/testing/tests/base/utils/utils.py,sha256=dUPDrgAxlfREQb33zz23MfzacLLuwjy2AO-PQQp_aSI,2820
73
+ winipedia_utils/testing/tests/base/utils/utils.py,sha256=mAhKC0ycOQVjUNjad-7TOXmZftg2hOFDFg-FG31zR-8,3633
74
74
  winipedia_utils/testing/tests/conftest.py,sha256=8RounBlI8Jq1aLaLNpv84MW4ne8Qq0aavQextDOp5ng,920
75
+ winipedia_utils/testing/tests/test_0.py,sha256=LFs2C8-A193VdGDfuJzqUSim5JUw1FmOf9w2ZvGS3P4,320
75
76
  winipedia_utils/text/__init__.py,sha256=j2bwtK6kyeHI6SnoBjpRju0C1W2n2paXBDlNjNtaUxA,48
76
77
  winipedia_utils/text/string.py,sha256=pK_VQXxSZa8HqHY1a6oMKfmN-OKteFE32eZaweCI22E,3508
77
- winipedia_utils-0.2.3.dist-info/licenses/LICENSE,sha256=3PrKJ2CWNrnyyHaC_r0wPDSukVWgmjOxHr__eQVH7cw,1087
78
- winipedia_utils-0.2.3.dist-info/METADATA,sha256=91glhhoAEBJGw1RHzfIpWyBRqmzGC2h6h4K0RYGkjbI,12507
79
- winipedia_utils-0.2.3.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
80
- winipedia_utils-0.2.3.dist-info/RECORD,,
78
+ winipedia_utils-0.2.5.dist-info/licenses/LICENSE,sha256=3PrKJ2CWNrnyyHaC_r0wPDSukVWgmjOxHr__eQVH7cw,1087
79
+ winipedia_utils-0.2.5.dist-info/METADATA,sha256=ibLmISgpTlK54UozpA2MuGXYIKYvds7ogNi8wuVl1Yc,12507
80
+ winipedia_utils-0.2.5.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
81
+ winipedia_utils-0.2.5.dist-info/RECORD,,