approval-utilities 10.1.0__tar.gz → 10.3.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-10.1.0 → approval_utilities-10.3.0}/PKG-INFO +1 -1
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/README.md +2 -3
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities.egg-info/PKG-INFO +2 -2
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/setup_utils.py +5 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/tests/test_inline_approvals.py +4 -4
- approval_utilities-10.3.0/tests/test_split_code.py +67 -0
- approval_utilities-10.3.0/version.py +1 -0
- approval_utilities-10.1.0/tests/test_split_code.py +0 -23
- approval_utilities-10.1.0/version.py +0 -1
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/LICENSE +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/MANIFEST.in +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/__init__.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/approvaltests/__init__.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/approvaltests/core/__init__.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/approvaltests/core/executable_command.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/approvaltests/core/verifiable.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/approvaltests/core/verify_parameters.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/list_utils.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utilities/__init__.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utilities/clipboard_utilities.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utilities/deprecated.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utilities/exceptions/__init__.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utilities/exceptions/exception_collector.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utilities/exceptions/exception_utils.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utilities/exceptions/multiple_exceptions.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utilities/logger/__init__.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utilities/logger/logging_instance.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utilities/logger/simple_logger.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utilities/map_reduce.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utilities/markdown_table.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utilities/multiline_string_utils.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utilities/os_utilities.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utilities/persistence/__init__.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utilities/persistence/loader.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utilities/persistence/saver.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utilities/stack_frame_utilities.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utilities/string_wrapper.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utilities/time_utilities.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utilities/wrapper.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utils.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities.egg-info/SOURCES.txt +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities.egg-info/dependency_links.txt +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities.egg-info/top_level.txt +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/requirements.prod.extras.txt +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/requirements.prod.required.txt +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/requirements.prod.txt +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/setup.cfg +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/setup.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/tests/test_asserts.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/tests/test_combinations.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/tests/test_custom_printers.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/tests/test_example_numpy.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/tests/test_exception_utils.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/tests/test_fileapprover.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/tests/test_list.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/tests/test_multiline_string_utils.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/tests/test_namer.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/tests/test_options.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/tests/test_pairwise_combinations.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/tests/test_python_patterns.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/tests/test_scenarios.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/tests/test_simple_logger.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/tests/test_verify.py +0 -0
- {approval_utilities-10.1.0 → approval_utilities-10.3.0}/tests/test_writer.py +0 -0
|
@@ -313,9 +313,8 @@ The best way to contribute is to [join our weekly mob/ensemble](./docs/Contribut
|
|
|
313
313
|
|
|
314
314
|
Pull requests are welcomed, particularly those accompanied by automated tests.
|
|
315
315
|
|
|
316
|
-
To run the self-tests
|
|
317
|
-
|
|
318
|
-
python -m tox
|
|
316
|
+
To run the self-tests:
|
|
317
|
+
`./run_tests.sh`
|
|
319
318
|
|
|
320
319
|
This will run the self-tests on several python versions. We support python 3.8 and above.
|
|
321
320
|
|
{approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
|
-
Name:
|
|
3
|
-
Version: 10.
|
|
2
|
+
Name: approval_utilities
|
|
3
|
+
Version: 10.3.0
|
|
4
4
|
Summary: Utilities for your production code that work well with approvaltests
|
|
5
5
|
Home-page: https://github.com/approvals/ApprovalTests.Python
|
|
6
6
|
Author: ApprovalTests Contributors
|
|
@@ -31,6 +31,11 @@ def do_the_setup(package_name, package_description, required, extra_requires):
|
|
|
31
31
|
python_requires=">=3.8",
|
|
32
32
|
packages=find_packages(include=["approvaltests*"]),
|
|
33
33
|
package_data={"approvaltests": ["reporters/reporters.json"]},
|
|
34
|
+
entry_points={
|
|
35
|
+
"pytest11": [
|
|
36
|
+
"approvaltests_pytest = approvaltests.pytest.pytest_plugin",
|
|
37
|
+
],
|
|
38
|
+
},
|
|
34
39
|
install_requires=required,
|
|
35
40
|
extras_require=extra_requires,
|
|
36
41
|
long_description=(get_parent_directory() / "README.md").read_text(),
|
|
@@ -11,7 +11,7 @@ from approvaltests import (
|
|
|
11
11
|
Reporter,
|
|
12
12
|
verify,
|
|
13
13
|
)
|
|
14
|
-
from approvaltests.reporters import MultiReporter
|
|
14
|
+
from approvaltests.reporters import MultiReporter, ReporterThatAutomaticallyApproves
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
def get_approved_via_doc_string():
|
|
@@ -47,7 +47,7 @@ def fizz_buzz(param):
|
|
|
47
47
|
return return_string
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
def
|
|
50
|
+
def test_fizz_buzz():
|
|
51
51
|
"""
|
|
52
52
|
1
|
|
53
53
|
2
|
|
@@ -64,7 +64,7 @@ def test_fizz_buzz_to_15():
|
|
|
64
64
|
def test_docstrings():
|
|
65
65
|
"""
|
|
66
66
|
hello
|
|
67
|
-
|
|
67
|
+
world
|
|
68
68
|
"""
|
|
69
69
|
# verify_inline(greetting())
|
|
70
70
|
# verify(greetting(), options=Options().inline(show_code= False))
|
|
@@ -72,7 +72,7 @@ def test_docstrings():
|
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
def greeting():
|
|
75
|
-
return "hello
|
|
75
|
+
return "hello\nworld"
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
class InlineReporter(Reporter):
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
from approval_utilities.utilities.multiline_string_utils import remove_indentation_from
|
|
2
|
+
from approvaltests import verify_all
|
|
3
|
+
from approvaltests.inline.split_code import SplitCode
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def test_splitting_code():
|
|
7
|
+
code_list = [
|
|
8
|
+
'''
|
|
9
|
+
def other_code():
|
|
10
|
+
\tpass
|
|
11
|
+
def testy_mctest():
|
|
12
|
+
\t"""
|
|
13
|
+
\tApproved: test_inline_approvals.py
|
|
14
|
+
\tReceived:test_inline_approvals.recieved.txt
|
|
15
|
+
\t"""
|
|
16
|
+
\tverify(greeting(), options = Options().inline())
|
|
17
|
+
|
|
18
|
+
def greeting():
|
|
19
|
+
\t# start of greeting() method
|
|
20
|
+
\treturn "using tabs"
|
|
21
|
+
''',
|
|
22
|
+
"""
|
|
23
|
+
def other_code():
|
|
24
|
+
\tpass
|
|
25
|
+
def testy_mctest():
|
|
26
|
+
\t'''
|
|
27
|
+
\tApproved: test_inline_approvals.py
|
|
28
|
+
\tReceived:test_inline_approvals.recieved.txt
|
|
29
|
+
\t'''
|
|
30
|
+
\tverify(greeting(), options = Options().inline())
|
|
31
|
+
|
|
32
|
+
def greeting():
|
|
33
|
+
\t# start of greeting() method
|
|
34
|
+
\treturn "using tabs"
|
|
35
|
+
""",
|
|
36
|
+
'''
|
|
37
|
+
def other_code():
|
|
38
|
+
pass
|
|
39
|
+
def testy_mctest():
|
|
40
|
+
"""
|
|
41
|
+
Approved: test_inline_approvals.py
|
|
42
|
+
Received:test_inline_approvals.recieved.txt
|
|
43
|
+
"""
|
|
44
|
+
verify(greeting(), options = Options().inline())
|
|
45
|
+
|
|
46
|
+
def greeting():
|
|
47
|
+
# start of greeting() method
|
|
48
|
+
return "using spaces instead of tabs"
|
|
49
|
+
''',
|
|
50
|
+
"""
|
|
51
|
+
def other_code():
|
|
52
|
+
pass
|
|
53
|
+
def testy_mctest():
|
|
54
|
+
verify(greeting(), options = Options().inline())
|
|
55
|
+
|
|
56
|
+
def greeting():
|
|
57
|
+
# start of greeting() method
|
|
58
|
+
return "not using docstring"
|
|
59
|
+
""",
|
|
60
|
+
]
|
|
61
|
+
verify_all(
|
|
62
|
+
"splitting code",
|
|
63
|
+
code_list,
|
|
64
|
+
lambda code: str(
|
|
65
|
+
SplitCode.on_method(remove_indentation_from(code), "testy_mctest")
|
|
66
|
+
),
|
|
67
|
+
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
version_number = "v10.3.0"
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
from approval_utilities.utilities.multiline_string_utils import remove_indentation_from
|
|
2
|
-
from approvaltests import verify
|
|
3
|
-
from approvaltests.inline.split_code import SplitCode
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def test_splitting_code():
|
|
7
|
-
code = remove_indentation_from(
|
|
8
|
-
'''
|
|
9
|
-
def other_code():
|
|
10
|
-
pass
|
|
11
|
-
def testy_mctest():
|
|
12
|
-
"""
|
|
13
|
-
Approved: test_inline_approvals.py
|
|
14
|
-
Received:test_inline_approvals.recieved.txt
|
|
15
|
-
"""
|
|
16
|
-
verify(greeting(), options = Options().inline())
|
|
17
|
-
|
|
18
|
-
def greeting():
|
|
19
|
-
# start of greeting() method
|
|
20
|
-
return "hello world"
|
|
21
|
-
'''
|
|
22
|
-
)
|
|
23
|
-
verify(SplitCode.on_method(code, "testy_mctest"))
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
version_number = "v10.1.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{approval_utilities-10.1.0 → approval_utilities-10.3.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
|
{approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utilities/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{approval_utilities-10.1.0 → approval_utilities-10.3.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-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utilities/map_reduce.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{approval_utilities-10.1.0 → approval_utilities-10.3.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-10.1.0 → approval_utilities-10.3.0}/approval_utilities/utilities/wrapper.py
RENAMED
|
File without changes
|
|
File without changes
|
{approval_utilities-10.1.0 → approval_utilities-10.3.0}/approval_utilities.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{approval_utilities-10.1.0 → approval_utilities-10.3.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{approval_utilities-10.1.0 → approval_utilities-10.3.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
|