You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
=================================== FAILURES ===================================
________________ test_idempotent_any_syntatically_valid_python _________________
@settings(
> max_examples=1000, # roughly 1k tests/minute, or half that under coverage
derandomize=False, # deterministic mode to avoid CI flakiness
deadline=None, # ignore Hypothesis' health checks; we already know that
suppress_health_check=HealthCheck.all(), # this is slow and filter-heavy.
)
test_mccabe.py:245:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.14/site-packages/hypothesmith/cst.py:278: in <lambda>
code = st.from_type(node).map(lambda n: libcst.Module([n]).code).filter(compilable)
/usr/lib64/python3.14/site-packages/libcst/_nodes/module.py:116: in code
return self.code_for_node(self)
/usr/lib64/python3.14/site-packages/libcst/_nodes/module.py:136: in code_for_node
node._codegen(state)
/usr/lib64/python3.14/site-packages/libcst/_nodes/base.py:299: in _codegen
self._codegen_impl(state, **kwargs)
/usr/lib64/python3.14/site-packages/libcst/_nodes/module.py:99: in _codegen_impl
stmt._codegen(state)
/usr/lib64/python3.14/site-packages/libcst/_nodes/base.py:299: in _codegen
self._codegen_impl(state, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Module(
body=[
0,
],
header=[],
footer=[],
encoding='utf-8',
default_indent=' ',
default_newline='\n',
has_trailing_newline=True,
)
state = CodegenState(default_indent=' ', default_newline='\n', provider=None, indent_tokens=[], tokens=[])
def _codegen_impl(self, state: CodegenState) -> None:
for h in self.header:
h._codegen(state)
for stmt in self.body:
> stmt._codegen(state)
E AttributeError: 'int' object has no attribute '_codegen'
E while generating 'src_contents' from one_of(<hypothesmith.syntactic.GrammarStrategy object at 0x7f85519c0d70>, builds_filtering(Module).map(lambda n: libcst.Module([n]).code).filter(compilable).map(record_targets))
E Explanation:
E These lines were always and only run by failing examples:
E /usr/lib/python3.14/site-packages/hypothesmith/cst.py:122
E Highest target scores:
E 1 (label='(hypothesmith from_node) number of unique ast node types')
E 1 (label='(hypothesmith from_node) total number of ast nodes')
E 1 (label='(hypothesmith) number of unique ast node types')
E 1 (label='(hypothesmith) total number of ast nodes')
E 3 (label='(hypothesmith from_node) instructions in bytecode')
E 3 (label='(hypothesmith) instructions in bytecode')
/usr/lib64/python3.14/site-packages/libcst/_nodes/module.py:99: AttributeError
The text was updated successfully, but these errors were encountered:
When trying to build mccabe with Python 3.14, the test generating code using hypothesmith and libcst fails.
I don't see anything specific to mccabe in the test itself (https://github.com/PyCQA/mccabe/blob/master/test_mccabe.py#L244), the fail comes from
max_example
.Here's the traceback.
The text was updated successfully, but these errors were encountered: