Package Details: python-syrupy 4.0.2-2

Git Clone URL: https://aur.archlinux.org/python-syrupy.git (read-only, click to copy)
Package Base: python-syrupy
Description: The sweeter pytest snapshot plugin
Upstream URL: https://github.com/tophat/syrupy
Licenses: Apache
Submitter: carlosal1015
Maintainer: carlosal1015
Last Packager: carlosal1015
Votes: 1
Popularity: 0.016039
First Submitted: 2022-10-25 20:36 (UTC)
Last Updated: 2023-05-06 12:18 (UTC)

Latest Comments

1 2 Next › Last »

j0hannes commented on 2023-02-26 10:53 (UTC)

The package fails to build with the following issues

=========================== short test summary info ============================
FAILED tests/integration/test_snapshot_option_update.py::test_update_targets_only_selected_module_tests_dash_k
FAILED tests/integration/test_snapshot_option_update.py::test_update_targets_only_selected_class_tests_dash_k
FAILED tests/integration/test_snapshot_use_extension.py::test_generated_snapshots
FAILED tests/integration/test_snapshot_use_extension.py::test_warns_on_snapshot_name
FAILED tests/integration/test_snapshot_use_extension.py::test_updated_snapshots
FAILED tests/integration/test_snapshot_use_extension.py::test_failed_snapshots
FAILED tests/integration/test_snapshot_use_extension.py::test_unmatched_snapshots
FAILED tests/integration/test_snapshot_use_extension.py::test_unsaved_snapshots
FAILED tests/integration/test_snapshot_outside_directory.py::test_generated_snapshots
FAILED tests/integration/test_snapshot_outside_directory.py::test_updated_snapshots_full_delete
FAILED tests/integration/test_snapshot_outside_directory.py::test_unmatched_snapshots
FAILED tests/integration/test_snapshot_outside_directory.py::test_updated_snapshots_partial_delete
FAILED tests/integration/test_pytest_extension.py::test_handles_pyargs_non_module_when_both_given
FAILED tests/integration/test_pytest_extension.py::test_ignores_non_function_nodes
FAILED tests/integration/test_snapshot_option_extension.py::test_snapshot_default_extension_option_success
FAILED tests/integration/test_snapshot_option_include_details.py::test_unused_snapshots_details_no_details_on_deletion
FAILED tests/integration/test_snapshot_option_include_details.py::test_unused_snapshots_details[options1-0]
FAILED tests/integration/test_snapshot_option_include_details.py::test_unused_snapshots_details[options0-1]
FAILED tests/integration/test_snapshot_option_include_details.py::test_unused_snapshots_details_multiple_tests
FAILED tests/integration/test_snapshot_option_include_details.py::test_unused_snapshots_details_multiple_locations
FAILED tests/integration/test_snapshot_option_defaults.py::test_injected_fixture
ERROR tests/integration/test_snapshot_option_update.py::test_update_targets_only_selected_module_tests_nodes
ERROR tests/integration/test_snapshot_option_update.py::test_update_targets_only_selected_parametrized_tests_for_update_dash_m
ERROR tests/integration/test_snapshot_option_update.py::test_update_targets_only_selected_parametrized_tests_for_update_dash_k
ERROR tests/integration/test_snapshot_option_update.py::test_update_removes_hanging_snapshot_fossil_file
ERROR tests/integration/test_snapshot_option_update.py::test_update_targets_only_selected_parametrized_tests_for_removal_dash_k
ERROR tests/integration/test_snapshot_option_update.py::test_update_removes_empty_snapshot_fossil_only
ERROR tests/integration/test_snapshot_option_update.py::test_update_success_shows_snapshot_report
ERROR tests/integration/test_snapshot_option_update.py::test_update_targets_only_selected_module_tests_file_for_update
ERROR tests/integration/test_snapshot_option_update.py::test_update_failure_shows_snapshot_diff
ERROR tests/integration/test_snapshot_option_update.py::test_update_targets_only_selected_module_tests_file_for_removal
ERROR tests/integration/test_snapshot_option_update.py::test_update_targets_only_selected_module_tests_nodes_pyargs
ERROR tests/integration/test_snapshot_option_warn_unused.py::test_unused_snapshots_failure
ERROR tests/integration/test_snapshot_option_warn_unused.py::test_unused_snapshots_deletion
ERROR tests/integration/test_snapshot_option_warn_unused.py::test_unused_snapshots_warning
ERROR tests/integration/test_snapshot_option_name.py::test_update - Failed: ...
ERROR tests/integration/test_snapshot_option_name.py::test_run_all - Failed: ...
ERROR tests/integration/test_snapshot_option_name.py::test_failure - Failed: ...
ERROR tests/integration/test_snapshot_similar_names_file_extension.py::test_run_single_test_case_in_file
ERROR tests/integration/test_snapshot_similar_names_file_extension.py::test_run_both_files_by_node
ERROR tests/integration/test_snapshot_similar_names_file_extension.py::test_run_all
ERROR tests/integration/test_snapshot_similar_names_file_extension.py::test_run_both_files_by_node_2
ERROR tests/integration/test_snapshot_similar_names_file_extension.py::test_run_all_but_one
ERROR tests/integration/test_snapshot_similar_names_file_extension.py::test_run_single_file
ERROR tests/integration/test_snapshot_similar_names_default.py::test_run_all_but_one
ERROR tests/integration/test_snapshot_similar_names_default.py::test_run_both_files_by_node
ERROR tests/integration/test_snapshot_similar_names_default.py::test_run_both_files_by_node_2
ERROR tests/integration/test_snapshot_similar_names_default.py::test_run_all
ERROR tests/integration/test_snapshot_similar_names_default.py::test_run_single_file
ERROR tests/integration/test_snapshot_similar_names_default.py::test_run_single_test_case_in_file
============ 21 failed, 187 passed, 4 xfailed, 29 errors in 11.43s =============
==> ERROR: A failure occurred in check().
Aborting...

carlosal1015 commented on 2022-11-14 19:15 (UTC)

The conflicts with hypothesis looks like a bug that could be improved in the test suite with Arch Linux, since upstream only are testing in Ubuntu.

SelectionRemark commented on 2022-11-14 17:51 (UTC)

After I have uninstalled python-hypothesis (which was marked as "orphan" anyway), installation of python-syrupy worked fine. Sorry for the noise

SelectionRemark commented on 2022-11-09 09:07 (UTC)

I am still getting errors when building the package (21 tests failing with the same ImportError: cannot import name 'HealthCheck' from partially initialized module 'hypothesis._settings' (most likely due to a circular import):

[...]

/var/tmp/pamac-build-bob/python-syrupy/src/syrupy-3.0.5/tests/integration/test_snapshot_option_defaults.py:24: Failed
---------------------------- Captured stdout setup -----------------------------
============================= test session starts ==============================
platform linux -- Python 3.10.7, pytest-7.1.3, pluggy-1.0.0 -- /var/tmp/pamac-build-bob/python-syrupy/src/syrupy-3.0.5/test-env/bin/python
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/_pytest/main.py", line 266, in wrap_session
INTERNALERROR>     config.hook.pytest_sessionstart(session=session)
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR>     return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/pluggy/_manager.py", line 327, in traced_hookexec
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/pluggy/_result.py", line 33, in from_call
INTERNALERROR>     result = func()
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/pluggy/_manager.py", line 324, in <lambda>
INTERNALERROR>     lambda: oldcall(hook_name, hook_impls, kwargs, firstresult)
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/_pytest/terminal.py", line 710, in pytest_sessionstart
INTERNALERROR>     lines = self.config.hook.pytest_report_header(
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/_pytest/config/compat.py", line 67, in fixed_hook
INTERNALERROR>     return hook(**kw)
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR>     return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/pluggy/_manager.py", line 327, in traced_hookexec
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/pluggy/_result.py", line 33, in from_call
INTERNALERROR>     result = func()
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/pluggy/_manager.py", line 324, in <lambda>
INTERNALERROR>     lambda: oldcall(hook_name, hook_impls, kwargs, firstresult)
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/_hypothesis_pytestplugin.py", line 138, in pytest_report_header
INTERNALERROR>     from hypothesis import Verbosity, settings
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 168, in exec_module
INTERNALERROR>     exec(co, module.__dict__)
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/hypothesis/__init__.py", line 19, in <module>
INTERNALERROR>     from hypothesis._settings import HealthCheck, Phase, Verbosity, settings
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 168, in exec_module
INTERNALERROR>     exec(co, module.__dict__)
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/hypothesis/_settings.py", line 32, in <module>
INTERNALERROR>     from hypothesis.internal.reflection import get_pretty_function_description
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 168, in exec_module
INTERNALERROR>     exec(co, module.__dict__)
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/hypothesis/internal/reflection.py", line 34, in <module>
INTERNALERROR>     from hypothesis.strategies._internal.strategies import T
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 168, in exec_module
INTERNALERROR>     exec(co, module.__dict__)
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/hypothesis/strategies/__init__.py", line 11, in <module>
INTERNALERROR>     from hypothesis.strategies._internal import SearchStrategy
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 168, in exec_module
INTERNALERROR>     exec(co, module.__dict__)
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/__init__.py", line 14, in <module>
INTERNALERROR>     from .strategies import SearchStrategy, check_strategy
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 168, in exec_module
INTERNALERROR>     exec(co, module.__dict__)
INTERNALERROR>   File "/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 28, in <module>
INTERNALERROR>     from hypothesis._settings import HealthCheck, Phase, Verbosity, settings
INTERNALERROR> ImportError: cannot import name 'HealthCheck' from partially initialized module 'hypothesis._settings' (most likely due to a circular import) (/usr/lib/python3.10/site-packages/hypothesis/_settings.py)
--------------------------- snapshot report summary ----------------------------
2 snapshots failed. 210 snapshots passed.
=========================== short test summary info ============================
FAILED tests/integration/test_snapshot_option_update.py::test_update_targets_only_selected_module_tests_dash_k
FAILED tests/integration/test_snapshot_option_update.py::test_update_targets_only_selected_class_tests_dash_k
FAILED tests/integration/test_snapshot_use_extension.py::test_generated_snapshots
FAILED tests/integration/test_snapshot_use_extension.py::test_warns_on_snapshot_name
FAILED tests/integration/test_snapshot_use_extension.py::test_updated_snapshots
FAILED tests/integration/test_snapshot_use_extension.py::test_failed_snapshots
FAILED tests/integration/test_snapshot_use_extension.py::test_unmatched_snapshots
FAILED tests/integration/test_snapshot_use_extension.py::test_unsaved_snapshots
FAILED tests/integration/test_snapshot_outside_directory.py::test_generated_snapshots
FAILED tests/integration/test_snapshot_outside_directory.py::test_updated_snapshots_full_delete
FAILED tests/integration/test_snapshot_outside_directory.py::test_unmatched_snapshots
FAILED tests/integration/test_snapshot_outside_directory.py::test_updated_snapshots_partial_delete
FAILED tests/integration/test_pytest_extension.py::test_handles_pyargs_non_module_when_both_given
FAILED tests/integration/test_pytest_extension.py::test_ignores_non_function_nodes
FAILED tests/integration/test_snapshot_option_extension.py::test_snapshot_default_extension_option_success
FAILED tests/integration/test_snapshot_option_include_details.py::test_unused_snapshots_details_no_details_on_deletion
FAILED tests/integration/test_snapshot_option_include_details.py::test_unused_snapshots_details[options1-0]
FAILED tests/integration/test_snapshot_option_include_details.py::test_unused_snapshots_details[options0-1]
FAILED tests/integration/test_snapshot_option_include_details.py::test_unused_snapshots_details_multiple_tests
FAILED tests/integration/test_snapshot_option_include_details.py::test_unused_snapshots_details_multiple_locations
FAILED tests/integration/test_snapshot_option_defaults.py::test_injected_fixture
ERROR tests/integration/test_snapshot_option_update.py::test_update_targets_only_selected_module_tests_nodes
ERROR tests/integration/test_snapshot_option_update.py::test_update_targets_only_selected_parametrized_tests_for_update_dash_m
ERROR tests/integration/test_snapshot_option_update.py::test_update_targets_only_selected_parametrized_tests_for_update_dash_k
ERROR tests/integration/test_snapshot_option_update.py::test_update_removes_hanging_snapshot_fossil_file
ERROR tests/integration/test_snapshot_option_update.py::test_update_targets_only_selected_parametrized_tests_for_removal_dash_k
ERROR tests/integration/test_snapshot_option_update.py::test_update_removes_empty_snapshot_fossil_only
ERROR tests/integration/test_snapshot_option_update.py::test_update_success_shows_snapshot_report
ERROR tests/integration/test_snapshot_option_update.py::test_update_targets_only_selected_module_tests_file_for_update
ERROR tests/integration/test_snapshot_option_update.py::test_update_failure_shows_snapshot_diff
ERROR tests/integration/test_snapshot_option_update.py::test_update_targets_only_selected_module_tests_file_for_removal
ERROR tests/integration/test_snapshot_option_update.py::test_update_targets_only_selected_module_tests_nodes_pyargs
ERROR tests/integration/test_snapshot_option_warn_unused.py::test_unused_snapshots_failure
ERROR tests/integration/test_snapshot_option_warn_unused.py::test_unused_snapshots_deletion
ERROR tests/integration/test_snapshot_option_warn_unused.py::test_unused_snapshots_warning
ERROR tests/integration/test_snapshot_option_name.py::test_update - Failed:  ...
ERROR tests/integration/test_snapshot_option_name.py::test_run_all - Failed: ...
ERROR tests/integration/test_snapshot_option_name.py::test_failure - Failed: ...
ERROR tests/integration/test_snapshot_similar_names_file_extension.py::test_run_single_test_case_in_file
ERROR tests/integration/test_snapshot_similar_names_file_extension.py::test_run_both_files_by_node
ERROR tests/integration/test_snapshot_similar_names_file_extension.py::test_run_all
ERROR tests/integration/test_snapshot_similar_names_file_extension.py::test_run_both_files_by_node_2
ERROR tests/integration/test_snapshot_similar_names_file_extension.py::test_run_all_but_one
ERROR tests/integration/test_snapshot_similar_names_file_extension.py::test_run_single_file
ERROR tests/integration/test_snapshot_similar_names_default.py::test_run_all_but_one
ERROR tests/integration/test_snapshot_similar_names_default.py::test_run_both_files_by_node
ERROR tests/integration/test_snapshot_similar_names_default.py::test_run_both_files_by_node_2
ERROR tests/integration/test_snapshot_similar_names_default.py::test_run_all
ERROR tests/integration/test_snapshot_similar_names_default.py::test_run_single_file
ERROR tests/integration/test_snapshot_similar_names_default.py::test_run_single_test_case_in_file
============ 21 failed, 187 passed, 4 xfailed, 29 errors in 11.43s =============
==> ERROR: A failure occurred in check().
    Aborting...

alan1world commented on 2022-11-04 14:40 (UTC)

It's discouraged to install the wheel directly, but it is possible.

Removing the build() and check() sections from the PKGBUILD and making these changes:

source=(https://files.pythonhosted.org/packages/py3/${_base::1}/$_base/${_base//-/_}-$pkgver-py3-none-any.whl)
sha512sums=('8ccff1caba6b31a3f1abf2ef68add20c79bbca02cc3b81c38a3893067e4a44ff511cb02a8cf9fd855f4adcddc21e5345add627f464cad8470787cb589aad1d1a')

package() {
  python -m installer --destdir="${pkgdir}" ${_base//-/_}-$pkgver-py3-none-any.whl

Results in a built package.

alan1world commented on 2022-11-04 11:14 (UTC)

The new package fails with a check() error again.

FAILED tests/integration/test_snapshot_option_update.py::test_update_failure_shows_snapshot_diff - Failed:  nomatch: ".*assert snapshot == \\['this', 'will', 'not', 'match'\\]"
=========== 1 failed, 235 passed, 4 xpassed, 297 warnings in 20.44s ============
==> ERROR: A failure occurred in check().
    Aborting...
:: Unable to build python-syrupy - makepkg exited with code: 4

alan1world commented on 2022-11-03 16:23 (UTC)

The includes in the toml file are not pulling in the rest of the files. It is include = ['src/syrupy/py.typed'] when it should be include = ['src/syrupy/**/*']

Syrupy will then build properly, and textual will build too.

carlosal1015 commented on 2022-11-03 14:06 (UTC)

Thank you dear @jose1711. Let's look what will happen.

jose1711 commented on 2022-11-03 09:40 (UTC)

Thank you @carlosal1015. Sadly that did not help (sources were not the problem). I created https://github.com/tophat/syrupy/issues/626.

carlosal1015 commented on 2022-10-27 21:23 (UTC)

Thanks for the hint dear @jose1711. Changing sources now.