approval-utilities 15.1.1__tar.gz → 15.2.0__tar.gz
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 approval-utilities might be problematic. Click here for more details.
- {approval_utilities-15.1.1/approval_utilities.egg-info → approval_utilities-15.2.0}/PKG-INFO +1 -1
- {approval_utilities-15.1.1 → approval_utilities-15.2.0/approval_utilities.egg-info}/PKG-INFO +1 -1
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_inline_approvals.py +50 -1
- approval_utilities-15.2.0/version.py +1 -0
- approval_utilities-15.1.1/version.py +0 -1
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/LICENSE +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/MANIFEST.in +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/README.md +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/__init__.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/approvaltests/__init__.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/approvaltests/core/__init__.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/approvaltests/core/executable_command.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/approvaltests/core/verifiable.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/approvaltests/core/verify_parameters.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/list_utils.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/py.typed +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/__init__.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/clipboard_utilities.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/deprecated.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/exceptions/__init__.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/exceptions/exception_collector.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/exceptions/exception_utils.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/exceptions/multiple_exceptions.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/logger/__init__.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/logger/logging_instance.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/logger/simple_logger.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/map_reduce.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/markdown_table.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/multiline_string_utils.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/os_utilities.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/persistence/__init__.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/persistence/loader.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/persistence/saver.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/stack_frame_utilities.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/string_wrapper.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/time_utilities.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/wrapper.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utils.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities.egg-info/SOURCES.txt +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities.egg-info/dependency_links.txt +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities.egg-info/top_level.txt +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/requirements.prod.extras.txt +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/requirements.prod.required.txt +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/requirements.prod.txt +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/setup.cfg +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/setup.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/setup_utils.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_approvaltests_temp_dir.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_asserts.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_build.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_combinations.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_compare_file_lists.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_custom_printers.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_example_numpy.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_exception_utils.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_fileapprover.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_find_stale_approved_files.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_list.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_multiline_string_utils.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_namer.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_options.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_pairwise_combinations.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_parse_inputs.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_python_patterns.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_scenarios.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_simple_logger.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_split_code.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_verify.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_verify_all.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_verify_argument_parser.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_workflow_matrix.py +0 -0
- {approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_writer.py +0 -0
|
@@ -15,8 +15,13 @@ from approvaltests import (
|
|
|
15
15
|
verify_all_combinations_with_labeled_input,
|
|
16
16
|
)
|
|
17
17
|
from approvaltests.inline.inline_options import InlineOptions
|
|
18
|
+
from approvaltests.inline.markers import PRESERVE_LEADING_WHITESPACE_MARKER
|
|
18
19
|
from approvaltests.inline.parse_docstring import parse_docstring
|
|
19
20
|
from approvaltests.namer.inline_comparator import InlineComparator
|
|
21
|
+
from approvaltests.namer.inline_python_reporter import (
|
|
22
|
+
detect_trailing_whitespace,
|
|
23
|
+
handle_preceeding_whitespace,
|
|
24
|
+
)
|
|
20
25
|
from approvaltests.reporters.report_quietly import ReportQuietly
|
|
21
26
|
from approvaltests.reporters.report_with_beyond_compare import (
|
|
22
27
|
ReportWithBeyondCompare,
|
|
@@ -137,17 +142,34 @@ def get_preceding_whitespace() -> str:
|
|
|
137
142
|
|
|
138
143
|
# fmt: off
|
|
139
144
|
@unittest.skipIf(sys.version_info >= (3, 13), "__doc__ removes preceding whitespace in Python 3.13+")
|
|
145
|
+
def test_preceding_whitespace_before_python_3_13() -> None:
|
|
146
|
+
"""
|
|
147
|
+
4 whitespaces
|
|
148
|
+
"""
|
|
149
|
+
verify(get_preceding_whitespace(), options=Options().inline())
|
|
150
|
+
|
|
140
151
|
def test_preceding_whitespace() -> None:
|
|
141
152
|
"""
|
|
153
|
+
<<approvaltests:preserve-leading-whitespace>>
|
|
142
154
|
4 whitespaces
|
|
143
155
|
"""
|
|
144
156
|
verify(get_preceding_whitespace(), options=Options().inline())
|
|
145
157
|
|
|
146
158
|
|
|
159
|
+
def test_no_preceeding_whitespace() -> None:
|
|
160
|
+
"""
|
|
161
|
+
4 whitespaces
|
|
162
|
+
applesauce
|
|
163
|
+
"""
|
|
164
|
+
text = " 4 whitespaces\napplesauce"
|
|
165
|
+
verify(text, options=Options().inline())
|
|
166
|
+
|
|
167
|
+
|
|
147
168
|
def test_trailing_whitespace() -> None:
|
|
148
169
|
"""
|
|
149
170
|
4 trailing whitespaces
|
|
150
|
-
"""
|
|
171
|
+
""" # Warning: Editors may remove trailing spaces, causing this test to fail
|
|
172
|
+
|
|
151
173
|
# Note: Pycharm will remove the trailing whitespaces, to disable this go to:
|
|
152
174
|
# File -> Settings -> Editor -> General -> On Save -> [ ] Remove trailing spaces
|
|
153
175
|
verify("4 trailing whitespaces ", options=Options().inline())
|
|
@@ -167,6 +189,18 @@ def test_bug_blank_lines() -> None:
|
|
|
167
189
|
verify("\n\ntest bug with blank lines\n\n\n\n", options=Options().inline())
|
|
168
190
|
|
|
169
191
|
|
|
192
|
+
def test_handle_preceeding_whitespace_all_lines_indented() -> None:
|
|
193
|
+
text = " indented with spaces\n\tindented with tab\n still indented"
|
|
194
|
+
result = handle_preceeding_whitespace(text)
|
|
195
|
+
assert result.startswith(PRESERVE_LEADING_WHITESPACE_MARKER)
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
def test_handle_preceeding_whitespace_one_line_not_indented() -> None:
|
|
199
|
+
text = " indented with spaces\nnot indented\n\tindented with tab"
|
|
200
|
+
result = handle_preceeding_whitespace(text)
|
|
201
|
+
assert not result.startswith(PRESERVE_LEADING_WHITESPACE_MARKER)
|
|
202
|
+
|
|
203
|
+
|
|
170
204
|
def test_inline_with_additional_reporter() -> None:
|
|
171
205
|
"""
|
|
172
206
|
hello
|
|
@@ -204,3 +238,18 @@ def test_inline_with_semi_automatic_inline() -> None:
|
|
|
204
238
|
except ApprovalException:
|
|
205
239
|
pass
|
|
206
240
|
verify(InlineComparator.get_test_method_doc_string())
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
def test_detect_trailing_whitespace_true() -> None:
|
|
244
|
+
text = "no trail\nwith trail \t\nnormal"
|
|
245
|
+
assert detect_trailing_whitespace(text)
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
def test_detect_trailing_whitespace_false() -> None:
|
|
249
|
+
text = "alpha\nbeta\ngamma"
|
|
250
|
+
assert not detect_trailing_whitespace(text)
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
def test_detect_trailing_whitespace_ignores_pure_empty_lines() -> None:
|
|
254
|
+
text = "line1\n\nline2"
|
|
255
|
+
assert not detect_trailing_whitespace(text)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
version_number = "v15.2.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
version_number = "v15.1.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/approvaltests/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/deprecated.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/map_reduce.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/os_utilities.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities/utilities/wrapper.py
RENAMED
|
File without changes
|
|
File without changes
|
{approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{approval_utilities-15.1.1 → approval_utilities-15.2.0}/approval_utilities.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_approvaltests_temp_dir.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_find_stale_approved_files.py
RENAMED
|
File without changes
|
|
File without changes
|
{approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_multiline_string_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{approval_utilities-15.1.1 → approval_utilities-15.2.0}/tests/test_verify_argument_parser.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|