ITADN

Error collecting tests: missing 1 required positional argument: 'alphabet'

#499ClosedApteryks 创建于 2024-11-29
A
Apterykscommented
Hi, Attempting to run the test suite with `pytest -vv`, I see this: ``` ============================= test session starts ============================== platform linux -- Python 3.10.7, pytest-8.3.3, pluggy-1.5.0 -- /gnu/store/jjzbav1s0x8lqg1aal13irspwwblwdf4-python-wrapper-3.10.7/bin/python cachedir: .pytest_cache hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase(PosixPath('/tmp/guix-build-python-flake8-bugbear-24.10.31.drv-0/flake8_bugbear-24.10.31/.hypothesis/examples')) rootdir: /tmp/guix-build-python-flake8-bugbear-24.10.31.drv-0/flake8_bugbear-24.10.31 configfile: pyproject.toml plugins: hypothesis-6.121.0 collecting ... collected 0 items / 1 error ==================================== ERRORS ==================================== ____________________ ERROR collecting tests/test_bugbear.py ____________________ tests/test_bugbear.py:1078: in <module> class TestFuzz(unittest.TestCase): tests/test_bugbear.py:1083: in TestFuzz @given(from_grammar().map(ast.parse)) /gnu/store/2x5zrns071bwz2w1rqjdc816ag6awspc-python-hypothesmith-0.1.9/lib/python3.10/site-packages/hypothesmith/syntactic.py:173: in from_grammar return GrammarStrategy(grammar, start, auto_target) /gnu/store/2x5zrns071bwz2w1rqjdc816ag6awspc-python-hypothesmith-0.1.9/lib/python3.10/site-packages/hypothesmith/syntactic.py:81: in __init__ super().__init__(grammar, start, explicit_strategies) E TypeError: LarkStrategy.__init__() missing 1 required positional argument: 'alphabet' =============================== warnings summary =============================== ../../../gnu/store/fxbzrh50d30d0digfi61azzz0hc9j2qx-python-hypothesis-6.121.0/lib/python3.10/site-packages/hypothesis/strategies/_internal/lazy.py:158 ../../../gnu/store/fxbzrh50d30d0digfi61azzz0hc9j2qx-python-hypothesis-6.121.0/lib/python3.10/site-packages/hypothesis/strategies/_internal/lazy.py:158 /gnu/store/fxbzrh50d30d0digfi61azzz0hc9j2qx-python-hypothesis-6.121.0/lib/python3.10/site-packages/hypothesis/strategies/_internal/lazy.py:158: HypothesisWarning: Generating overly large repr. This is an expensive operation, and with a length of 265 kB is unlikely to be useful. Use -Wignore to ignore the warning, or -Werror to get a traceback. self.__representation = repr_call( ../../../gnu/store/fxbzrh50d30d0digfi61azzz0hc9j2qx-python-hypothesis-6.121.0/lib/python3.10/site-packages/hypothesis/strategies/_internal/lazy.py:158 /gnu/store/fxbzrh50d30d0digfi61azzz0hc9j2qx-python-hypothesis-6.121.0/lib/python3.10/site-packages/hypothesis/strategies/_internal/lazy.py:158: HypothesisWarning: Generating overly large repr. This is an expensive operation, and with a length of 531 kB is unlikely to be useful. Use -Wignore to ignore the warning, or -Werror to get a traceback. self.__representation = repr_call( ../../../gnu/store/fxbzrh50d30d0digfi61azzz0hc9j2qx-python-hypothesis-6.121.0/lib/python3.10/site-packages/hypothesis/strategies/_internal/lazy.py:158 /gnu/store/fxbzrh50d30d0digfi61azzz0hc9j2qx-python-hypothesis-6.121.0/lib/python3.10/site-packages/hypothesis/strategies/_internal/lazy.py:158: HypothesisWarning: Generating overly large repr. This is an expensive operation, and with a length of 797 kB is unlikely to be useful. Use -Wignore to ignore the warning, or -Werror to get a traceback. self.__representation = repr_call( ../../../gnu/store/fxbzrh50d30d0digfi61azzz0hc9j2qx-python-hypothesis-6.121.0/lib/python3.10/site-packages/hypothesis/strategies/_internal/lazy.py:158 ../../../gnu/store/fxbzrh50d30d0digfi61azzz0hc9j2qx-python-hypothesis-6.121.0/lib/python3.10/site-packages/hypothesis/strategies/_internal/lazy.py:158 /gnu/store/fxbzrh50d30d0digfi61azzz0hc9j2qx-python-hypothesis-6.121.0/lib/python3.10/site-packages/hypothesis/strategies/_internal/lazy.py:158: HypothesisWarning: Generating overly large repr. This is an expensive operation, and with a length of 1595 kB is unlikely to be useful. Use -Wignore to ignore the warning, or -Werror to get a traceback. self.__representation = repr_call( ../../../gnu/store/fxbzrh50d30d0digfi61azzz0hc9j2qx-python-hypothesis-6.121.0/lib/python3.10/site-packages/hypothesis/strategies/_internal/lazy.py:158 /gnu/store/fxbzrh50d30d0digfi61azzz0hc9j2qx-python-hypothesis-6.121.0/lib/python3.10/site-packages/hypothesis/strategies/_internal/lazy.py:158: HypothesisWarning: Generating overly large repr. This is an expensive operation, and with a length of 266 kB is unlikely to be useful. Use -Wignore to ignore the warning, or -Werror to get a traceback. self.__representation = repr_call( ../../../gnu/store/fxbzrh50d30d0digfi61azzz0hc9j2qx-python-hypothesis-6.121.0/lib/python3.10/site-packages/hypothesis/strategies/_internal/lazy.py:158 /gnu/store/fxbzrh50d30d0digfi61azzz0hc9j2qx-python-hypothesis-6.121.0/lib/python3.10/site-packages/hypothesis/strategies/_internal/lazy.py:158: HypothesisWarning: Generating overly large repr. This is an expensive operation, and with a length of 1861 kB is unlikely to be useful. Use -Wignore to ignore the warning, or -Werror to get a traceback. self.__representation = repr_call( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ ERROR tests/test_bugbear.py - TypeError: LarkStrategy.__init__() missing 1 required positional argument: 'alphabet' !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! ========================= 8 warnings, 1 error in 2.84s ========================= ``` I'm using Python 3.10, the 24.10.31 release of flake8-bugbear and these inputs: ``` python-attrs@24.2.0 python-flake8@4.0.1 python-hypothesis@6.121.0 python-hypothesmith@0.1.9 + python-pytest@8.3.3 python-setuptools@67.6.1 python-wheel@0.40.0 ``` Thank you!
关闭于 2025-05-06 3 条评论