Source: python-cattrs
Version: 23.2.3-1
Severity: serious
X-Debbugs-CC: python-at...@packages.debian.org
Tags: sid trixie
User: debian...@lists.debian.org
Usertags: needs-update
Control: affects -1 src:python-attrs

Dear maintainer(s),

With a recent upload of python-attrs the autopkgtest of python-cattrs fails in testing when that autopkgtest is run with the binary packages of python-attrs from unstable. It passes when run with only packages from testing. In tabular form:

                       pass            fail
python-attrs           from testing    24.2.0-1
python-cattrs          from testing    23.2.3-1
all others             from testing    from testing

I copied some of the output at the bottom of this report. I noticed the errors involve nan and found this in the upstream changelog [0]
"""
The generated __eq__ methods have been sped up significantly by generating a chain of attribute comparisons instead of constructing and comparing tuples. This change arguably makes the behavior more correct, but changes it if an attribute compares equal by identity but not value, like float('nan'). #1310
""". I suspect that python-cattrs needs a change upstream.

Currently this regression is blocking the migration of python-attrs to testing [1]. Of course, python-attrs shouldn't just break your autopkgtest (or even worse, your package), but it seems to me that the change in python-attrs was intended and your package needs to update to the new situation.

If this is a real problem in your package (and not only in your autopkgtest), the right binary package(s) from python-attrs should really add a versioned Breaks on the unfixed version of (one of your) package(s). Note: the Breaks is nice even if the issue is only in the autopkgtest as it helps the migration software to figure out the right versions to combine in the tests.

More information about this bug and the reason for filing it can be found on
https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation

Paul

[0] https://www.attrs.org/en/stable/changelog.html#id2
[1] https://qa.debian.org/excuses.php?package=python-attrs

https://ci.debian.net/data/autopkgtest/testing/amd64/p/python-cattrs/53966623/log.gz

=================================== FAILURES =================================== 1837s ____________________________ test_simple_roundtrip _____________________________ 1837s 1837s @given(simple_typed_classes(newtypes=False), unstructure_strats)
1837s >   def test_simple_roundtrip(cls_and_vals, strat):
1837s 1837s f = <function given.<locals>.run_test_as_given.<locals>.wrapped_test at 0x7fe2bd221b20> 1837s 1837s tests/test_baseconverter.py:18: 1837s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1837s 1837s cls_and_vals = (<class 'tests.typed.HypAttrsClass'>, ('', frozenset(), frozenset(), frozenset(), frozenset(), frozenset(), ...), {})
1837s strat = <UnstructureStrategy.AS_DICT: 'asdict'>
1837s 1837s @given(simple_typed_classes(newtypes=False), unstructure_strats)
1837s     def test_simple_roundtrip(cls_and_vals, strat):
1837s         """
1837s Simple classes with metadata can be unstructured and restructured.
1837s         """
1837s         converter = BaseConverter(unstruct_strat=strat)
1837s         cl, vals, kwargs = cls_and_vals
1837s         assume(strat is UnstructureStrategy.AS_DICT or not kwargs)
1837s         inst = cl(*vals, **kwargs)
1837s > assert inst == converter.structure(converter.unstructure(inst), cl) 1837s E AssertionError: assert HypAttrsClass...set(), _j=nan) == HypAttrsClass...set(), _j=nan)
1837s E         1837s E         Omitting 6 identical items, use -vv to show
1837s E         Differing attributes:
1837s E         ['_j']
1837s E         1837s E         Drill down into differing attribute _j:
1837s E           _j: nan != nan
1837s E Class fields: [_CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=1, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=2, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=3, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=4, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=5, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=6, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})] 1837s E Attributes: {'a': _CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), '_b': _CountingAttr(counter=1, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='c', metadata={}), '_d': _CountingAttr(counter=2, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), 'e': _CountingAttr(counter=3, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='_f', metadata={}), 'g': _CountingAttr(counter=4, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), '_h': _CountingAttr(counter=5, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='i', metadata={}), '_j': _CountingAttr(counter=6, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})}
1837s E       Falsifying example: test_simple_roundtrip(
1837s E           cls_and_vals=(tests.typed.HypAttrsClass,
1837s E            ('',
1837s E             frozenset(),
1837s E             frozenset(),
1837s E             frozenset(),
1837s E             frozenset(),
1837s E             frozenset(),
1837s E             nan),
1837s E            {}),
1837s E strat=UnstructureStrategy.AS_DICT, # or any other generated value
1837s E       )
1837s 1837s cl         = <class 'tests.typed.HypAttrsClass'>
1837s cls_and_vals = (<class 'tests.typed.HypAttrsClass'>, ('', frozenset(), frozenset(), frozenset(), frozenset(), frozenset(), ...), {}) 1837s converter = <cattrs.converters.BaseConverter object at 0x7fe2b5c68640> 1837s inst = HypAttrsClass(a='', _b=frozenset(), _d=frozenset(), e=frozenset(), g=frozenset(), _h=frozenset(), _j=nan)
1837s kwargs     = {}
1837s strat      = <UnstructureStrategy.AS_DICT: 'asdict'>
1837s vals = ('', frozenset(), frozenset(), frozenset(), frozenset(), frozenset(), ...)
1837s 1837s tests/test_baseconverter.py:26: AssertionError
1837s ________________________ test_simple_roundtrip_defaults ________________________ 1837s 1837s @given(simple_typed_attrs(defaults=True, newtypes=False), unstructure_strats)
1837s >   def test_simple_roundtrip_defaults(attr_and_strat, strat):
1837s 1837s f = <function given.<locals>.run_test_as_given.<locals>.wrapped_test at 0x7fe2bd222520> 1837s 1837s tests/test_baseconverter.py:30: 1837s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1837s 1837s attr_and_strat = (_CountingAttr(counter=10783, _default=nan, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), floats())
1837s strat = <UnstructureStrategy.AS_DICT: 'asdict'>
1837s 1837s @given(simple_typed_attrs(defaults=True, newtypes=False), unstructure_strats)
1837s     def test_simple_roundtrip_defaults(attr_and_strat, strat):
1837s         """
1837s Simple classes with metadata can be unstructured and restructured.
1837s         """
1837s         a, _ = attr_and_strat
1837s         assume(strat is UnstructureStrategy.AS_DICT or not a.kw_only)
1837s         cl = make_class("HypClass", {"a": a})
1837s         converter = BaseConverter(unstruct_strat=strat)
1837s         inst = cl()
1837s assert converter.unstructure(converter.structure({}, cl)) == converter.unstructure(
1837s             inst
1837s         )
1837s > assert inst == converter.structure(converter.unstructure(inst), cl)
1837s E       AssertionError: assert HypClass(a=nan) == HypClass(a=nan)
1837s E         1837s E         Differing attributes:
1837s E         ['a']
1837s E         1837s E         Drill down into differing attribute a:
1837s E           a: nan != nan
1837s E       Falsifying example: test_simple_roundtrip_defaults(
1837s E           attr_and_strat=(_CountingAttr(counter=10783,
1837s E             _default=nan,
1837s E             repr=True,
1837s E             eq=True,
1837s E             order=True,
1837s E             hash=None,
1837s E             init=True,
1837s E             on_setattr=None,
1837s E             alias=None,
1837s E             metadata={}),
1837s E            floats()),
1837s E strat=UnstructureStrategy.AS_DICT, # or any other generated value
1837s E       )
1837s 1837s _          = floats()
1837s a = _CountingAttr(counter=10783, _default=nan, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}) 1837s attr_and_strat = (_CountingAttr(counter=10783, _default=nan, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), floats())
1837s cl         = <class 'tests.test_baseconverter.HypClass'>
1837s converter = <cattrs.converters.BaseConverter object at 0x7fe2b7acd9c0>
1837s inst       = HypClass(a=nan)
1837s strat      = <UnstructureStrategy.AS_DICT: 'asdict'>
1837s 1837s tests/test_baseconverter.py:42: AssertionError
1837s ____________________________ test_nested_roundtrip _____________________________
1837s 1837s     @given(nested_typed_classes(newtypes=False))
1837s >   def test_nested_roundtrip(cls_and_vals):
1837s 1837s f = <function given.<locals>.run_test_as_given.<locals>.wrapped_test at 0x7fe2bd222840> 1837s 1837s tests/test_baseconverter.py:46: 1837s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1837s 1837s cls_and_vals = (<class 'tests.typed.HypClass'>, (nan,), {})
1837s 1837s     @given(nested_typed_classes(newtypes=False))
1837s     def test_nested_roundtrip(cls_and_vals):
1837s         """
1837s Nested classes with metadata can be unstructured and restructured.
1837s         """
1837s         converter = BaseConverter()
1837s         cl, vals, kwargs = cls_and_vals
1837s         # Vals are a tuple, convert into a dictionary.
1837s         inst = cl(*vals, **kwargs)
1837s > assert inst == converter.structure(converter.unstructure(inst), cl)
1837s E       AssertionError: assert HypClass(a=nan) == HypClass(a=nan)
1837s E         1837s E         Differing attributes:
1837s E         ['a']
1837s E         1837s E         Drill down into differing attribute a:
1837s E           a: nan != nan
1837s E       Falsifying example: test_nested_roundtrip(
1837s E           cls_and_vals=(tests.typed.HypClass, (nan,), {}),
1837s E       )
1837s E       Explanation:
1837s E           These lines were always and only run by failing examples:
1837s E /usr/lib/python3/dist-packages/_pytest/_io/terminalwriter.py:250
1837s 1837s cl         = <class 'tests.typed.HypClass'>
1837s cls_and_vals = (<class 'tests.typed.HypClass'>, (nan,), {})
1837s converter = <cattrs.converters.BaseConverter object at 0x7fe2b6194b40>
1837s inst       = HypClass(a=nan)
1837s kwargs     = {}
1837s vals       = (nan,)
1837s 1837s tests/test_baseconverter.py:54: AssertionError
1837s __________________________ test_union_field_roundtrip __________________________
1837s   + Exception Group Traceback (most recent call last):
1837s | File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 341, in from_call
1837s   |     result: TResult | None = func()
1837s   |                              ^^^^^^
1837s | File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 242, in <lambda> 1837s | lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
1837s   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1837s | File "/usr/lib/python3/dist-packages/pluggy/_hooks.py", line 513, in __call__ 1837s | return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) 1837s | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1837s | File "/usr/lib/python3/dist-packages/pluggy/_manager.py", line 120, in _hookexec 1837s | return self._inner_hookexec(hook_name, methods, kwargs, firstresult) 1837s | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 182, in _multicall
1837s   |     return outcome.get_result()
1837s   |            ^^^^^^^^^^^^^^^^^^^^
1837s | File "/usr/lib/python3/dist-packages/pluggy/_result.py", line 100, in get_result
1837s   |     raise exc.with_traceback(exc.__traceback__)
1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 167, in _multicall
1837s   |     teardown.throw(outcome._exception)
1837s | File "/usr/lib/python3/dist-packages/_pytest/threadexception.py", line 92, in pytest_runtest_call
1837s   |     yield from thread_exception_runtest_hook()
1837s | File "/usr/lib/python3/dist-packages/_pytest/threadexception.py", line 68, in thread_exception_runtest_hook
1837s   |     yield
1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 167, in _multicall
1837s   |     teardown.throw(outcome._exception)
1837s | File "/usr/lib/python3/dist-packages/_pytest/unraisableexception.py", line 95, in pytest_runtest_call
1837s   |     yield from unraisable_exception_runtest_hook()
1837s | File "/usr/lib/python3/dist-packages/_pytest/unraisableexception.py", line 70, in unraisable_exception_runtest_hook
1837s   |     yield
1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 167, in _multicall
1837s   |     teardown.throw(outcome._exception)
1837s | File "/usr/lib/python3/dist-packages/_pytest/logging.py", line 846, in pytest_runtest_call
1837s   |     yield from self._runtest_for(item, "call")
1837s | File "/usr/lib/python3/dist-packages/_pytest/logging.py", line 829, in _runtest_for
1837s   |     yield
1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 167, in _multicall
1837s   |     teardown.throw(outcome._exception)
1837s | File "/usr/lib/python3/dist-packages/_pytest/capture.py", line 880, in pytest_runtest_call
1837s   |     return (yield)
1837s   |             ^^^^^
1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 167, in _multicall
1837s   |     teardown.throw(outcome._exception)
1837s | File "/usr/lib/python3/dist-packages/_pytest/skipping.py", line 257, in pytest_runtest_call
1837s   |     return (yield)
1837s   |             ^^^^^
1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 103, in _multicall
1837s   |     res = hook_impl.function(*args)
1837s   |           ^^^^^^^^^^^^^^^^^^^^^^^^^
1837s | File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 174, in pytest_runtest_call
1837s   |     item.runtest()
1837s | File "/usr/lib/python3/dist-packages/_pytest/python.py", line 1627, in runtest
1837s   |     self.ihook.pytest_pyfunc_call(pyfuncitem=self)
1837s | File "/usr/lib/python3/dist-packages/pluggy/_hooks.py", line 513, in __call__ 1837s | return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) 1837s | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1837s | File "/usr/lib/python3/dist-packages/pluggy/_manager.py", line 120, in _hookexec 1837s | return self._inner_hookexec(hook_name, methods, kwargs, firstresult) 1837s | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 139, in _multicall
1837s   |     raise exception.with_traceback(exception.__traceback__)
1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 103, in _multicall
1837s   |     res = hook_impl.function(*args)
1837s   |           ^^^^^^^^^^^^^^^^^^^^^^^^^
1837s | File "/usr/lib/python3/dist-packages/_pytest/python.py", line 159, in pytest_pyfunc_call
1837s   |     result = testfunction(**testargs)
1837s   |              ^^^^^^^^^^^^^^^^^^^^^^^^
1837s | File "/tmp/autopkgtest-lxc.znzoubjy/downtmp/autopkgtest_tmp/build/tests/test_baseconverter.py", line 71, in test_union_field_roundtrip
1837s   |     @given(
1837s | 1837s | File "/usr/lib/python3/dist-packages/hypothesis/core.py", line 1706, in wrapped_test
1837s   |     raise the_error_hypothesis_found
1837s | ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)
1837s   +-+---------------- 1 ----------------
1837s     | Traceback (most recent call last):
1837s | File "/tmp/autopkgtest-lxc.znzoubjy/downtmp/autopkgtest_tmp/build/tests/test_baseconverter.py", line 109, in test_union_field_roundtrip 1837s | assert inst == converter.structure(converter.unstructure(inst), C) 1837s | AssertionError: assert C(a=HypAttrsC...h={}, _j=nan)) == C(a=HypAttrsC...h={}, _j=nan))
1837s     |   1837s     |   Differing attributes:
1837s     |   ['a']
1837s     |   1837s     |   Drill down into differing attribute a:
1837s | a: HypAttrsClass(a=0, _b=0, _d=0, e=frozenset(), g={}, _h={}, _j=nan) != HypAttrsClass(a=0, _b=0, _d=0, e=frozenset(), g={}, _h={}, _j=nan)
1837s     |     ...
1837s | 1837s | ...Full output truncated (6 lines hidden), use '-vv' to show 1837s | Class fields: [_CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=1, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=2, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=3, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=4, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=5, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=6, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})] 1837s | Attributes: {'a': _CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), '_b': _CountingAttr(counter=1, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='c', metadata={}), '_d': _CountingAttr(counter=2, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), 'e': _CountingAttr(counter=3, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='_f', metadata={}), 'g': _CountingAttr(counter=4, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), '_h': _CountingAttr(counter=5, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='i', metadata={}), '_j': _CountingAttr(counter=6, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})} 1837s | Class fields: [_CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})] 1837s | Attributes: {'a': _CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})}
1837s     | Falsifying example: test_union_field_roundtrip(
1837s     |     cl_and_vals_a=(tests.typed.HypAttrsClass,
1837s     |      (0,
1837s     |       0,
1837s     |       0,
1837s     |       frozenset(),
1837s     |       {},
1837s     |       {},
1837s | struct.unpack('d', struct.pack('Q', 0x7ff7fffffffffff5))[0]),
1837s     |      {}),
1837s     |     cl_and_vals_b=(tests.typed.HypAttrsClass, (None,), {}),
1837s     |     strat=UnstructureStrategy.AS_TUPLE,
1837s     | )
1837s     | Explanation:
1837s     |     These lines were always and only run by failing examples:
1837s | /usr/lib/python3/dist-packages/_pytest/_io/terminalwriter.py:250
1837s     +---------------- 2 ----------------
1837s     | Traceback (most recent call last):
1837s | File "/tmp/autopkgtest-lxc.znzoubjy/downtmp/autopkgtest_tmp/build/tests/test_baseconverter.py", line 99, in test_union_field_roundtrip 1837s | assert inst == converter.structure(converter.unstructure(inst), C) 1837s | AssertionError: assert C(a=HypAttrsC...h={}, _j=nan)) == C(a=HypAttrsC...h={}, _j=nan))
1837s     |   1837s     |   Differing attributes:
1837s     |   ['a']
1837s     |   1837s     |   Drill down into differing attribute a:
1837s | a: HypAttrsClass(a=0, _b=0, _d=0, e=frozenset(), g={}, _h={}, _j=nan) != HypAttrsClass(a=0, _b=0, _d=0, e=frozenset(), g={}, _h={}, _j=nan)
1837s     |     ...
1837s | 1837s | ...Full output truncated (6 lines hidden), use '-vv' to show 1837s | Class fields: [_CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=1, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=2, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=3, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=4, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=5, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=6, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})] 1837s | Attributes: {'a': _CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), '_b': _CountingAttr(counter=1, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='c', metadata={}), '_d': _CountingAttr(counter=2, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), 'e': _CountingAttr(counter=3, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='_f', metadata={}), 'g': _CountingAttr(counter=4, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), '_h': _CountingAttr(counter=5, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='i', metadata={}), '_j': _CountingAttr(counter=6, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})} 1837s | Class fields: [_CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})] 1837s | Attributes: {'a': _CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})}
1837s     | Falsifying example: test_union_field_roundtrip(
1837s | # The test always failed when commented parts were varied together.
1837s     |     cl_and_vals_a=(tests.typed.HypAttrsClass,
1837s     |      (0,
1837s     |       0,
1837s     |       0,
1837s     |       frozenset(),
1837s     |       {},
1837s     |       {},
1837s | struct.unpack('d', struct.pack('Q', 0x7ff7fffffffffff5))[0]),
1837s     |      {}),
1837s     |     cl_and_vals_b=(tests.typed.HypAttrsClass,
1837s     |      (None,),
1837s     |      {}),  # or any other generated value
1837s | strat=UnstructureStrategy.AS_DICT, # or any other generated value
1837s     | )
1837s     | Explanation:
1837s     |     These lines were always and only run by failing examples:
1837s | /usr/lib/python3/dist-packages/_pytest/_io/terminalwriter.py:250
1837s     +------------------------------------
1837s ---------------------------------- Hypothesis ---------------------------------- 1837s WARNING: Hypothesis has spent more than five minutes working to shrink a failing example, and stopped because it is making very slow progress. When you re-run your tests, shrinking will resume and may take this long before aborting again. 1837s PLEASE REPORT THIS if you can provide a reproducing example, so that we can improve shrinking performance for everyone. 1837s ________________________ test_310_union_field_roundtrip ________________________
1837s   + Exception Group Traceback (most recent call last):
1837s | File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 341, in from_call
1837s   |     result: TResult | None = func()
1837s   |                              ^^^^^^
1837s | File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 242, in <lambda> 1837s | lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
1837s   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1837s | File "/usr/lib/python3/dist-packages/pluggy/_hooks.py", line 513, in __call__ 1837s | return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) 1837s | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1837s | File "/usr/lib/python3/dist-packages/pluggy/_manager.py", line 120, in _hookexec 1837s | return self._inner_hookexec(hook_name, methods, kwargs, firstresult) 1837s | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 182, in _multicall
1837s   |     return outcome.get_result()
1837s   |            ^^^^^^^^^^^^^^^^^^^^
1837s | File "/usr/lib/python3/dist-packages/pluggy/_result.py", line 100, in get_result
1837s   |     raise exc.with_traceback(exc.__traceback__)
1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 167, in _multicall
1837s   |     teardown.throw(outcome._exception)
1837s | File "/usr/lib/python3/dist-packages/_pytest/threadexception.py", line 92, in pytest_runtest_call
1837s   |     yield from thread_exception_runtest_hook()
1837s | File "/usr/lib/python3/dist-packages/_pytest/threadexception.py", line 68, in thread_exception_runtest_hook
1837s   |     yield
1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 167, in _multicall
1837s   |     teardown.throw(outcome._exception)
1837s | File "/usr/lib/python3/dist-packages/_pytest/unraisableexception.py", line 95, in pytest_runtest_call
1837s   |     yield from unraisable_exception_runtest_hook()
1837s | File "/usr/lib/python3/dist-packages/_pytest/unraisableexception.py", line 70, in unraisable_exception_runtest_hook
1837s   |     yield
1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 167, in _multicall
1837s   |     teardown.throw(outcome._exception)
1837s | File "/usr/lib/python3/dist-packages/_pytest/logging.py", line 846, in pytest_runtest_call
1837s   |     yield from self._runtest_for(item, "call")
1837s | File "/usr/lib/python3/dist-packages/_pytest/logging.py", line 829, in _runtest_for
1837s   |     yield
1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 167, in _multicall
1837s   |     teardown.throw(outcome._exception)
1837s | File "/usr/lib/python3/dist-packages/_pytest/capture.py", line 880, in pytest_runtest_call
1837s   |     return (yield)
1837s   |             ^^^^^
1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 167, in _multicall
1837s   |     teardown.throw(outcome._exception)
1837s | File "/usr/lib/python3/dist-packages/_pytest/skipping.py", line 257, in pytest_runtest_call
1837s   |     return (yield)
1837s   |             ^^^^^
1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 103, in _multicall
1837s   |     res = hook_impl.function(*args)
1837s   |           ^^^^^^^^^^^^^^^^^^^^^^^^^
1837s | File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 174, in pytest_runtest_call
1837s   |     item.runtest()
1837s | File "/usr/lib/python3/dist-packages/_pytest/python.py", line 1627, in runtest
1837s   |     self.ihook.pytest_pyfunc_call(pyfuncitem=self)
1837s | File "/usr/lib/python3/dist-packages/pluggy/_hooks.py", line 513, in __call__ 1837s | return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) 1837s | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1837s | File "/usr/lib/python3/dist-packages/pluggy/_manager.py", line 120, in _hookexec 1837s | return self._inner_hookexec(hook_name, methods, kwargs, firstresult) 1837s | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 139, in _multicall
1837s   |     raise exception.with_traceback(exception.__traceback__)
1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 103, in _multicall
1837s   |     res = hook_impl.function(*args)
1837s   |           ^^^^^^^^^^^^^^^^^^^^^^^^^
1837s | File "/usr/lib/python3/dist-packages/_pytest/python.py", line 159, in pytest_pyfunc_call
1837s   |     result = testfunction(**testargs)
1837s   |              ^^^^^^^^^^^^^^^^^^^^^^^^
1837s | File "/tmp/autopkgtest-lxc.znzoubjy/downtmp/autopkgtest_tmp/build/tests/test_baseconverter.py", line 113, in test_310_union_field_roundtrip 1837s | @settings(suppress_health_check=[HealthCheck.filter_too_much, HealthCheck.too_slow])
1837s   |                    ^^^
1837s | File "/usr/lib/python3/dist-packages/hypothesis/core.py", line 1706, in wrapped_test
1837s   |     raise the_error_hypothesis_found
1837s | ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)
1837s   +-+---------------- 1 ----------------
1837s     | Traceback (most recent call last):
1837s | File "/tmp/autopkgtest-lxc.znzoubjy/downtmp/autopkgtest_tmp/build/tests/test_baseconverter.py", line 152, in test_310_union_field_roundtrip 1837s | assert inst == converter.structure(converter.unstructure(inst), C) 1837s | AssertionError: assert C(a=HypAttrsC..., ''), _j={})) == C(a=HypAttrsC..., ''), _j={}))
1837s     |   1837s     |   Differing attributes:
1837s     |   ['a']
1837s     |   1837s     |   Drill down into differing attribute a:
1837s | a: HypAttrsClass(a=('', '', ''), _b=('', '', ''), _d=nan, e=0, g=frozenset(), _h=('', '', ''), _j={}) != HypAttrsClass(a=('', '', ''), _b=('', '', ''), _d=nan, e=0, g=frozenset(), _h=('', '', ''), _j={})
1837s     |     ...
1837s | 1837s | ...Full output truncated (6 lines hidden), use '-vv' to show 1837s | Class fields: [_CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=1, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=2, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=3, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=4, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=5, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=6, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})] 1837s | Attributes: {'a': _CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), '_b': _CountingAttr(counter=1, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='c', metadata={}), '_d': _CountingAttr(counter=2, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), 'e': _CountingAttr(counter=3, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='_f', metadata={}), 'g': _CountingAttr(counter=4, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), '_h': _CountingAttr(counter=5, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='i', metadata={}), '_j': _CountingAttr(counter=6, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})} 1837s | Class fields: [_CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})] 1837s | Attributes: {'a': _CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})}
1837s     | Falsifying example: test_310_union_field_roundtrip(
1837s | # The test always failed when commented parts were varied together.
1837s     |     cl_and_vals_a=(tests.typed.HypAttrsClass,
1837s | (('', '', ''), ('', '', ''), nan, 0, frozenset(), ('', '', ''), {}),
1837s     |      {}),
1837s     |     cl_and_vals_b=(tests.typed.HypAttrsClass,
1837s     |      (None,),
1837s     |      {}),  # or any other generated value
1837s | strat=UnstructureStrategy.AS_TUPLE, # or any other generated value
1837s     | )
1837s     | Explanation:
1837s     |     These lines were always and only run by failing examples:
1837s | /usr/lib/python3/dist-packages/_pytest/_io/terminalwriter.py:250
1837s     +---------------- 2 ----------------
1837s     | Traceback (most recent call last):
1837s | File "/tmp/autopkgtest-lxc.znzoubjy/downtmp/autopkgtest_tmp/build/tests/test_baseconverter.py", line 142, in test_310_union_field_roundtrip 1837s | assert inst == converter.structure(converter.unstructure(inst), C) 1837s | AssertionError: assert C(a=HypAttrsC..., ''), _j={})) == C(a=HypAttrsC..., ''), _j={}))
1837s     |   1837s     |   Differing attributes:
1837s     |   ['a']
1837s     |   1837s     |   Drill down into differing attribute a:
1837s | a: HypAttrsClass(a=('', '', ''), _b=('', '', ''), _d=nan, e=0, g=frozenset(), _h=('', '', ''), _j={}) != HypAttrsClass(a=('', '', ''), _b=('', '', ''), _d=nan, e=0, g=frozenset(), _h=('', '', ''), _j={})
1837s     |     ...
1837s | 1837s | ...Full output truncated (6 lines hidden), use '-vv' to show 1837s | Class fields: [_CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=1, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=2, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=3, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=4, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=5, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=6, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})] 1837s | Attributes: {'a': _CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), '_b': _CountingAttr(counter=1, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='c', metadata={}), '_d': _CountingAttr(counter=2, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), 'e': _CountingAttr(counter=3, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='_f', metadata={}), 'g': _CountingAttr(counter=4, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), '_h': _CountingAttr(counter=5, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='i', metadata={}), '_j': _CountingAttr(counter=6, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})} 1837s | Class fields: [_CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})] 1837s | Attributes: {'a': _CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})}
1837s     | Falsifying example: test_310_union_field_roundtrip(
1837s | # The test always failed when commented parts were varied together.
1837s     |     cl_and_vals_a=(tests.typed.HypAttrsClass,
1837s | (('', '', ''), ('', '', ''), nan, 0, frozenset(), ('', '', ''), {}),
1837s     |      {}),
1837s     |     cl_and_vals_b=(tests.typed.HypAttrsClass,
1837s     |      (None,),
1837s     |      {}),  # or any other generated value
1837s | strat=UnstructureStrategy.AS_DICT, # or any other generated value
1837s     | )
1837s     | Explanation:
1837s     |     These lines were always and only run by failing examples:
1837s | /usr/lib/python3/dist-packages/_pytest/_io/terminalwriter.py:250
1837s     +------------------------------------
1837s ________________________ test_optional_field_roundtrip _________________________
1837s 1837s     @given(simple_typed_classes(defaults=False, newtypes=False))
1837s >   def test_optional_field_roundtrip(cl_and_vals):
1837s 1837s f = <function given.<locals>.run_test_as_given.<locals>.wrapped_test at 0x7fe2bd223060> 1837s 1837s tests/test_baseconverter.py:156: 1837s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1837s 1837s cl_and_vals = (<class 'tests.typed.HypAttrsClass'>, (nan,), {})
1837s 1837s     @given(simple_typed_classes(defaults=False, newtypes=False))
1837s     def test_optional_field_roundtrip(cl_and_vals):
1837s         """
1837s Classes with optional fields can be unstructured and structured.
1837s         """
1837s         converter = BaseConverter()
1837s         cl, vals, kwargs = cl_and_vals
1837s     1837s         @define
1837s         class C:
1837s             a: Optional[cl]
1837s     1837s         inst = C(a=cl(*vals, **kwargs))
1837s > assert inst == converter.structure(converter.unstructure(inst), C) 1837s E AssertionError: assert C(a=HypAttrsClass(a=nan)) == C(a=HypAttrsClass(a=nan))
1837s E         1837s E         Differing attributes:
1837s E         ['a']
1837s E         1837s E         Drill down into differing attribute a:
1837s E           a: HypAttrsClass(a=nan) != HypAttrsClass(a=nan)
1837s E           ...
1837s E 1837s E ...Full output truncated (5 lines hidden), use '-vv' to show 1837s E Class fields: [_CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})] 1837s E Attributes: {'a': _CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})}
1837s E       Falsifying example: test_optional_field_roundtrip(
1837s E           cl_and_vals=(tests.typed.HypAttrsClass, (nan,), {}),
1837s E       )
1837s 1837s C = <class 'tests.test_baseconverter.test_optional_field_roundtrip.<locals>.C'>
1837s cl         = <class 'tests.typed.HypAttrsClass'>
1837s cl_and_vals = (<class 'tests.typed.HypAttrsClass'>, (nan,), {})
1837s converter = <cattrs.converters.BaseConverter object at 0x7fe2b7acc440>
1837s inst       = C(a=HypAttrsClass(a=nan))
1837s kwargs     = {}
1837s vals       = (nan,)
1837s 1837s tests/test_baseconverter.py:168: AssertionError
1837s ______________________ test_310_optional_field_roundtrip _______________________ 1837s 1837s @pytest.mark.skipif(not is_py310_plus, reason="3.10+ union syntax")
1837s >   @given(simple_typed_classes(defaults=False, newtypes=False))
1837s 1837s f = <function given.<locals>.run_test_as_given.<locals>.wrapped_test at 0x7fe2bd200180> 1837s 1837s tests/test_baseconverter.py:177: 1837s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1837s 1837s cl_and_vals = (<class 'tests.typed.HypAttrsClass'>, (nan,), {}) 1837s 1837s @pytest.mark.skipif(not is_py310_plus, reason="3.10+ union syntax")
1837s     @given(simple_typed_classes(defaults=False, newtypes=False))
1837s     def test_310_optional_field_roundtrip(cl_and_vals):
1837s         """
1837s Classes with optional fields can be unstructured and structured.
1837s         """
1837s         converter = BaseConverter()
1837s         cl, vals, kwargs = cl_and_vals
1837s     1837s         @define
1837s         class C:
1837s             a: cl | None
1837s     1837s         inst = C(a=cl(*vals, **kwargs))
1837s > assert inst == converter.structure(converter.unstructure(inst), C) 1837s E AssertionError: assert C(a=HypAttrsClass(a=nan)) == C(a=HypAttrsClass(a=nan))
1837s E         1837s E         Differing attributes:
1837s E         ['a']
1837s E         1837s E         Drill down into differing attribute a:
1837s E           a: HypAttrsClass(a=nan) != HypAttrsClass(a=nan)
1837s E           ...
1837s E 1837s E ...Full output truncated (5 lines hidden), use '-vv' to show 1837s E Class fields: [_CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})] 1837s E Attributes: {'a': _CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})}
1837s E       Falsifying example: test_310_optional_field_roundtrip(
1837s E           cl_and_vals=(tests.typed.HypAttrsClass, (nan,), {}),
1837s E       )
1837s E       Explanation:
1837s E           These lines were always and only run by failing examples:
1837s E /usr/lib/python3/dist-packages/_pytest/_io/terminalwriter.py:250 1837s 1837s C = <class 'tests.test_baseconverter.test_310_optional_field_roundtrip.<locals>.C'>
1837s cl         = <class 'tests.typed.HypAttrsClass'>
1837s cl_and_vals = (<class 'tests.typed.HypAttrsClass'>, (nan,), {})
1837s converter = <cattrs.converters.BaseConverter object at 0x7fe2335aee40>
1837s inst       = C(a=HypAttrsClass(a=nan))
1837s kwargs     = {}
1837s vals       = (nan,)
1837s 1837s tests/test_baseconverter.py:190: AssertionError
1837s ________________________ test_simple_roundtrip_defaults ________________________
1837s 1837s     @given(simple_typed_attrs(defaults=True))
1837s >   def test_simple_roundtrip_defaults(attr_and_vals):
1837s 1837s f = <function given.<locals>.run_test_as_given.<locals>.wrapped_test at 0x7fe2bd201bc0> 1837s 1837s tests/test_converter.py:73: 1837s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1837s 1837s attr_and_vals = (_CountingAttr(counter=127885, _default=nan, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), floats())
1837s 1837s     @given(simple_typed_attrs(defaults=True))
1837s     def test_simple_roundtrip_defaults(attr_and_vals):
1837s         """
1837s Simple classes with metadata can be unstructured and restructured.
1837s         """
1837s         a, _ = attr_and_vals
1837s         cl = make_class("HypClass", {"a": a})
1837s         converter = Converter()
1837s         inst = cl()
1837s assert converter.unstructure(converter.structure({}, cl)) == converter.unstructure(
1837s             inst
1837s         )
1837s > assert inst == converter.structure(converter.unstructure(inst), cl)
1837s E       AssertionError: assert HypClass(a=nan) == HypClass(a=nan)
1837s E         1837s E         Differing attributes:
1837s E         ['a']
1837s E         1837s E         Drill down into differing attribute a:
1837s E           a: nan != nan
1837s E       Falsifying example: test_simple_roundtrip_defaults(
1837s E           attr_and_vals=(_CountingAttr(counter=127885,
1837s E             _default=nan,
1837s E             repr=True,
1837s E             eq=True,
1837s E             order=True,
1837s E             hash=None,
1837s E             init=True,
1837s E             on_setattr=None,
1837s E             alias=None,
1837s E             metadata={}),
1837s E            floats()),
1837s E       )
1837s 1837s _          = floats()
1837s a = _CountingAttr(counter=127885, _default=nan, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}) 1837s attr_and_vals = (_CountingAttr(counter=127885, _default=nan, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), floats())
1837s cl         = <class 'tests.test_converter.HypClass'>
1837s converter  = <cattrs.converters.Converter object at 0x7fe2bccec7c0>
1837s inst       = HypClass(a=nan)
1837s 1837s tests/test_converter.py:84: AssertionError
1837s ____________________________ test_nested_roundtrip _____________________________ 1837s 1837s @given(nested_typed_classes(defaults=True, min_attrs=1), booleans())
1837s >   def test_nested_roundtrip(cls_and_vals, omit_if_default):
1837s 1837s f = <function given.<locals>.run_test_as_given.<locals>.wrapped_test at 0x7fe2bd202a20> 1837s 1837s tests/test_converter.py:203: 1837s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1837s 1837s cls_and_vals = (<class 'tests.typed.HypClass'>, (None, None, None, 0, 0, '', ...), {'n': 0, 'o': 0, 'p': '', 'q': {}, ...})
1837s omit_if_default = False
1837s 1837s @given(nested_typed_classes(defaults=True, min_attrs=1), booleans())
1837s     def test_nested_roundtrip(cls_and_vals, omit_if_default):
1837s         """
1837s Nested classes with metadata can be unstructured and restructured.
1837s         """
1837s         converter = Converter(omit_if_default=omit_if_default)
1837s         cl, vals, kwargs = cls_and_vals
1837s         # Vals are a tuple, convert into a dictionary.
1837s         inst = cl(*vals, **kwargs)
1837s         unstructured = converter.unstructure(inst)
1837s >       assert inst == converter.structure(unstructured, cl)
1837s E AssertionError: assert HypClass(a=No... _v=[], w=nan) == HypClass(a=No... _v=[], w=nan)
1837s E         1837s E         Omitting 22 identical items, use -vv to show
1837s E         Differing attributes:
1837s E         ['w']
1837s E         1837s E         Drill down into differing attribute w:
1837s E           w: nan != nan
1837s E       Falsifying example: test_nested_roundtrip(
1837s E           cls_and_vals=(tests.typed.HypClass,
1837s E            (None,
1837s E             None,
1837s E             None,
1837s E             0,
1837s E             0,
1837s E             '',
1837s E             '',
1837s E             set(),
1837s E             None,
1837s E             {},
1837s E             {'': 0, '0': 0},
1837s E             '',
1837s E             0.0),
1837s E            {'n': 0,
1837s E             'o': 0,
1837s E             'p': '',
1837s E             'q': {},
1837s E             'r': frozenset(),
1837s E             's': set(),
1837s E             't': {'': 0},
1837s E             'u': {},
1837s E             'v': [],
1837s E             'w': nan}),
1837s E           omit_if_default=False,
1837s E       )
1837s 1837s cl         = <class 'tests.typed.HypClass'>
1837s cls_and_vals = (<class 'tests.typed.HypClass'>, (None, None, None, 0, 0, '', ...), {'n': 0, 'o': 0, 'p': '', 'q': {}, ...})
1837s converter  = <cattrs.converters.Converter object at 0x7fe287699e40>
1837s inst = HypClass(a=None, _b=None, c=None, _d=0, e=0, _f='', g='', _h=set(), i=None, _j={}, k={'': 0, '0': 0}, _l='', m=0.0, _n=0, o=0, _p='', q={}, _r=frozenset(), s=set(), _t={'': 0}, u={}, _v=[], w=nan)
1837s kwargs     = {'n': 0, 'o': 0, 'p': '', 'q': {}, ...}
1837s omit_if_default = False
1837s unstructured = {'_b': None, '_d': 0, '_f': '', '_h': set(), ...}
1837s vals       = (None, None, None, 0, 0, '', ...)
1837s 1837s tests/test_converter.py:212: AssertionError
1837s ---------------------------------- Hypothesis ---------------------------------- 1837s WARNING: Hypothesis has spent more than five minutes working to shrink a failing example, and stopped because it is making very slow progress. When you re-run your tests, shrinking will resume and may take this long before aborting again. 1837s PLEASE REPORT THIS if you can provide a reproducing example, so that we can improve shrinking performance for everyone. 1837s _________________________ test_nested_roundtrip_tuple __________________________
1837s 1837s     @given(
1837s > nested_typed_classes(defaults=True, min_attrs=1, kw_only=False, newtypes=False),
1837s         booleans(),
1837s     )
1837s 1837s f = <function given.<locals>.run_test_as_given.<locals>.wrapped_test at 0x7fe2bd202e80> 1837s 1837s tests/test_converter.py:216: 1837s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1837s 1837s cls_and_vals = (<class 'tests.typed.HypClass'>, ([HypClass(a=0, _b=0, c=0, _d=0, e=0, _f=frozenset(), g=frozenset(), _h=frozenset(), i=[], _j=[], k=nan)],), {})
1837s omit_if_default = False
1837s 1837s     @given(
1837s nested_typed_classes(defaults=True, min_attrs=1, kw_only=False, newtypes=False),
1837s         booleans(),
1837s     )
1837s def test_nested_roundtrip_tuple(cls_and_vals, omit_if_default: bool):
1837s         """
1837s Nested classes with metadata can be unstructured and restructured.
1837s         """
1837s         converter = Converter(
1837s unstruct_strat=UnstructureStrategy.AS_TUPLE, omit_if_default=omit_if_default
1837s         )
1837s         cl, vals, _ = cls_and_vals
1837s         # Vals are a tuple, convert into a dictionary.
1837s         inst = cl(*vals)
1837s         unstructured = converter.unstructure(inst)
1837s >       assert inst == converter.structure(unstructured, cl)
1837s E AssertionError: assert HypClass(a=[H...j=[], k=nan)]) == HypClass(a=[H...j=[], k=nan)])
1837s E         1837s E         Differing attributes:
1837s E         ['a']
1837s E         1837s E         Drill down into differing attribute a:
1837s E a: [HypClass(a=0, _b=0, c=0, _d=0, e=0, _f=frozenset(), g=frozenset(), _h=frozenset(), i=[], _j=[], k=nan)] != [HypClass(a=0, _b=0, c=0, _d=0, e=0, _f=frozenset(), g=frozenset(), _h=frozenset(), i=[], _j=[], k=nan)] 1837s E At index 0 diff: HypClass(a=0, _b=0, c=0, _d=0, e=0, _f=frozenset(), g=frozenset(), _h=frozenset(), i=[], _j=[], k=nan) != HypClass(a=0, _b=0, c=0, _d=0, e=0, _f=frozenset(), g=frozenset(), _h=frozenset(), i=[], _j=[], k=nan)... 1837s E 1837s E ...Full output truncated (5 lines hidden), use '-vv' to show
1837s E       Falsifying example: test_nested_roundtrip_tuple(
1837s E           cls_and_vals=(tests.typed.HypClass,
1837s E            ([HypClass(a=0,
1837s E               _b=0,
1837s E               c=0,
1837s E               _d=0,
1837s E               e=0,
1837s E               _f=frozenset(),
1837s E               g=frozenset(),
1837s E               _h=frozenset(),
1837s E               i=[],
1837s E               _j=[],
1837s E               k=nan)],),
1837s E            {}),
1837s E           omit_if_default=False,
1837s E       )
1837s E       Explanation:
1837s E           These lines were always and only run by failing examples:
1837s E /usr/lib/python3/dist-packages/_pytest/_io/terminalwriter.py:250
1837s 1837s _          = {}
1837s cl         = <class 'tests.typed.HypClass'>
1837s cls_and_vals = (<class 'tests.typed.HypClass'>, ([HypClass(a=0, _b=0, c=0, _d=0, e=0, _f=frozenset(), g=frozenset(), _h=frozenset(), i=[], _j=[], k=nan)],), {})
1837s converter  = <cattrs.converters.Converter object at 0x7fe25143bce0>
1837s inst = HypClass(a=[HypClass(a=0, _b=0, c=0, _d=0, e=0, _f=frozenset(), g=frozenset(), _h=frozenset(), i=[], _j=[], k=nan)])
1837s omit_if_default = False
1837s unstructured = ([(0, 0, 0, 0, 0, frozenset(), ...)],)
1837s vals = ([HypClass(a=0, _b=0, c=0, _d=0, e=0, _f=frozenset(), g=frozenset(), _h=frozenset(), i=[], _j=[], k=nan)],)
1837s 1837s tests/test_converter.py:230: AssertionError
1837s ---------------------------------- Hypothesis ---------------------------------- 1837s WARNING: Hypothesis has spent more than five minutes working to shrink a failing example, and stopped because it is making very slow progress. When you re-run your tests, shrinking will resume and may take this long before aborting again. 1837s PLEASE REPORT THIS if you can provide a reproducing example, so that we can improve shrinking performance for everyone. 1837s __________________________ test_union_field_roundtrip __________________________
1837s   + Exception Group Traceback (most recent call last):
1837s | File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 341, in from_call
1837s   |     result: TResult | None = func()
1837s   |                              ^^^^^^
1837s | File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 242, in <lambda> 1837s | lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
1837s   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1837s | File "/usr/lib/python3/dist-packages/pluggy/_hooks.py", line 513, in __call__ 1837s | return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) 1837s | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1837s | File "/usr/lib/python3/dist-packages/pluggy/_manager.py", line 120, in _hookexec 1837s | return self._inner_hookexec(hook_name, methods, kwargs, firstresult) 1837s | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 182, in _multicall
1837s   |     return outcome.get_result()
1837s   |            ^^^^^^^^^^^^^^^^^^^^
1837s | File "/usr/lib/python3/dist-packages/pluggy/_result.py", line 100, in get_result
1837s   |     raise exc.with_traceback(exc.__traceback__)
1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 167, in _multicall
1837s   |     teardown.throw(outcome._exception)
1837s | File "/usr/lib/python3/dist-packages/_pytest/threadexception.py", line 92, in pytest_runtest_call
1837s   |     yield from thread_exception_runtest_hook()
1837s | File "/usr/lib/python3/dist-packages/_pytest/threadexception.py", line 68, in thread_exception_runtest_hook
1837s   |     yield
1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 167, in _multicall
1837s   |     teardown.throw(outcome._exception)
1837s | File "/usr/lib/python3/dist-packages/_pytest/unraisableexception.py", line 95, in pytest_runtest_call
1837s   |     yield from unraisable_exception_runtest_hook()
1837s | File "/usr/lib/python3/dist-packages/_pytest/unraisableexception.py", line 70, in unraisable_exception_runtest_hook
1837s   |     yield
1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 167, in _multicall
1837s   |     teardown.throw(outcome._exception)
1837s | File "/usr/lib/python3/dist-packages/_pytest/logging.py", line 846, in pytest_runtest_call
1837s   |     yield from self._runtest_for(item, "call")
1837s | File "/usr/lib/python3/dist-packages/_pytest/logging.py", line 829, in _runtest_for
1837s   |     yield
1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 167, in _multicall
1837s   |     teardown.throw(outcome._exception)
1837s | File "/usr/lib/python3/dist-packages/_pytest/capture.py", line 880, in pytest_runtest_call
1837s   |     return (yield)
1837s   |             ^^^^^
1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 167, in _multicall
1837s   |     teardown.throw(outcome._exception)
1837s | File "/usr/lib/python3/dist-packages/_pytest/skipping.py", line 257, in pytest_runtest_call
1837s   |     return (yield)
1837s   |             ^^^^^
1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 103, in _multicall
1837s   |     res = hook_impl.function(*args)
1837s   |           ^^^^^^^^^^^^^^^^^^^^^^^^^
1837s | File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 174, in pytest_runtest_call
1837s   |     item.runtest()
1837s | File "/usr/lib/python3/dist-packages/_pytest/python.py", line 1627, in runtest
1837s   |     self.ihook.pytest_pyfunc_call(pyfuncitem=self)
1837s | File "/usr/lib/python3/dist-packages/pluggy/_hooks.py", line 513, in __call__ 1837s | return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) 1837s | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1837s | File "/usr/lib/python3/dist-packages/pluggy/_manager.py", line 120, in _hookexec 1837s | return self._inner_hookexec(hook_name, methods, kwargs, firstresult) 1837s | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 139, in _multicall
1837s   |     raise exception.with_traceback(exception.__traceback__)
1837s | File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 103, in _multicall
1837s   |     res = hook_impl.function(*args)
1837s   |           ^^^^^^^^^^^^^^^^^^^^^^^^^
1837s | File "/usr/lib/python3/dist-packages/_pytest/python.py", line 159, in pytest_pyfunc_call
1837s   |     result = testfunction(**testargs)
1837s   |              ^^^^^^^^^^^^^^^^^^^^^^^^
1837s | File "/tmp/autopkgtest-lxc.znzoubjy/downtmp/autopkgtest_tmp/build/tests/test_converter.py", line 234, in test_union_field_roundtrip
1837s   |     @given(
1837s | 1837s | File "/usr/lib/python3/dist-packages/hypothesis/core.py", line 1706, in wrapped_test
1837s   |     raise the_error_hypothesis_found
1837s | ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)
1837s   +-+---------------- 1 ----------------
1837s     | Traceback (most recent call last):
1837s | File "/tmp/autopkgtest-lxc.znzoubjy/downtmp/autopkgtest_tmp/build/tests/test_converter.py", line 274, in test_union_field_roundtrip
1837s     |     assert inst == converter.structure(unstructured, C)
1837s | AssertionError: assert C(a=HypAttrsC...n='', _p=nan)) == C(a=HypAttrsC...n='', _p=nan))
1837s     |   1837s     |   Differing attributes:
1837s     |   ['a']
1837s     |   1837s     |   Drill down into differing attribute a:
1837s | a: HypAttrsClass(a=0, _b=0, _d=0, e=0, g=0, _h=0, _j='', k='', m='', _n='', _p=nan) != HypAttrsClass(a=0, _b=0, _d=0, e=0, g=0, _h=0, _j='', k='', m='', _n='', _p=nan)
1837s     |     ...
1837s | 1837s | ...Full output truncated (6 lines hidden), use '-vv' to show 1837s | Class fields: [_CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=1, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=2, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=3, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=4, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=5, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=6, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=7, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=8, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=9, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=10, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})] 1837s | Attributes: {'a': _CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), '_b': _CountingAttr(counter=1, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='c', metadata={}), '_d': _CountingAttr(counter=2, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), 'e': _CountingAttr(counter=3, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='_f', metadata={}), 'g': _CountingAttr(counter=4, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), '_h': _CountingAttr(counter=5, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='i', metadata={}), '_j': _CountingAttr(counter=6, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), 'k': _CountingAttr(counter=7, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='_l', metadata={}), 'm': _CountingAttr(counter=8, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), '_n': _CountingAttr(counter=9, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='o', metadata={}), '_p': _CountingAttr(counter=10, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})} 1837s | Class fields: [_CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})] 1837s | Attributes: {'a': _CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})}
1837s     | Falsifying example: test_union_field_roundtrip(
1837s     |     cl_and_vals_a=(tests.typed.HypAttrsClass,
1837s     |      (0,
1837s     |       0,
1837s     |       0,
1837s     |       0,
1837s     |       0,
1837s     |       0,
1837s     |       '',
1837s     |       '',
1837s     |       '',
1837s     |       '',
1837s | struct.unpack('d', struct.pack('Q', 0x7ff7fffffffffffa))[0]),
1837s     |      {}),
1837s     |     cl_and_vals_b=(tests.typed.HypAttrsClass, (None,), {}),
1837s     |     strat=UnstructureStrategy.AS_TUPLE,
1837s     | )
1837s     +---------------- 2 ----------------
1837s     | Traceback (most recent call last):
1837s | File "/tmp/autopkgtest-lxc.znzoubjy/downtmp/autopkgtest_tmp/build/tests/test_converter.py", line 263, in test_union_field_roundtrip 1837s | assert inst == converter.structure(converter.unstructure(unstructured), C) 1837s | AssertionError: assert C(a=HypAttrsC...n='', _p=nan)) == C(a=HypAttrsC...n='', _p=nan))
1837s     |   1837s     |   Differing attributes:
1837s     |   ['a']
1837s     |   1837s     |   Drill down into differing attribute a:
1837s | a: HypAttrsClass(a=0, _b=0, _d=0, e=0, g=0, _h=0, _j='', k='', m='', _n='', _p=nan) != HypAttrsClass(a=0, _b=0, _d=0, e=0, g=0, _h=0, _j='', k='', m='', _n='', _p=nan)
1837s     |     ...
1837s | 1837s | ...Full output truncated (6 lines hidden), use '-vv' to show 1837s | Class fields: [_CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=1, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=2, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=3, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=4, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=5, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=6, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=7, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=8, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=9, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=10, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})] 1837s | Attributes: {'a': _CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), '_b': _CountingAttr(counter=1, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='c', metadata={}), '_d': _CountingAttr(counter=2, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), 'e': _CountingAttr(counter=3, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='_f', metadata={}), 'g': _CountingAttr(counter=4, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), '_h': _CountingAttr(counter=5, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='i', metadata={}), '_j': _CountingAttr(counter=6, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), 'k': _CountingAttr(counter=7, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='_l', metadata={}), 'm': _CountingAttr(counter=8, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), '_n': _CountingAttr(counter=9, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='o', metadata={}), '_p': _CountingAttr(counter=10, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})} 1837s | Class fields: [_CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})] 1837s | Attributes: {'a': _CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})}
1837s     | Falsifying example: test_union_field_roundtrip(
1837s     |     cl_and_vals_a=(tests.typed.HypAttrsClass,
1837s     |      (0,
1837s     |       0,
1837s     |       0,
1837s     |       0,
1837s     |       0,
1837s     |       0,
1837s     |       '',
1837s     |       '',
1837s     |       '',
1837s     |       '',
1837s | struct.unpack('d', struct.pack('Q', 0x7ff7fffffffffff9))[0]),
1837s     |      {}),
1837s     |     cl_and_vals_b=(tests.typed.HypAttrsClass, (None,), {}),
1837s     |     strat=UnstructureStrategy.AS_DICT,
1837s     | )
1837s     | Explanation:
1837s     |     These lines were always and only run by failing examples:
1837s | /usr/lib/python3/dist-packages/_pytest/_io/terminalwriter.py:250
1837s     +------------------------------------
1837s ---------------------------------- Hypothesis ---------------------------------- 1837s WARNING: Hypothesis has spent more than five minutes working to shrink a failing example, and stopped because it is making very slow progress. When you re-run your tests, shrinking will resume and may take this long before aborting again. 1837s PLEASE REPORT THIS if you can provide a reproducing example, so that we can improve shrinking performance for everyone. 1837s ________________________ test_310_union_field_roundtrip ________________________ 1837s 1837s @pytest.mark.skipif(not is_py310_plus, reason="3.10+ union syntax") 1837s > @settings(suppress_health_check=[HealthCheck.filter_too_much, HealthCheck.too_slow]) 1837s 1837s f = <function given.<locals>.run_test_as_given.<locals>.wrapped_test at 0x7fe2bd203ba0> 1837s 1837s tests/test_converter.py:278: 1837s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1837s 1837s cl_and_vals_a = (<class 'tests.typed.HypAttrsClass'>, (0, 0, '', frozenset(), [], nan), {'_l': 0, '_r': frozenset(), 'j': 0, 'm': 0, ...})
1837s cl_and_vals_b = (<class 'tests.typed.HypAttrsClass'>, (None,), {})
1837s strat = <UnstructureStrategy.AS_DICT: 'asdict'>
1837s 1837s @pytest.mark.skipif(not is_py310_plus, reason="3.10+ union syntax") 1837s @settings(suppress_health_check=[HealthCheck.filter_too_much, HealthCheck.too_slow])
1837s     @given(
1837s         simple_typed_classes(defaults=False, newtypes=False),
1837s         simple_typed_classes(defaults=False, newtypes=False),
1837s         unstructure_strats,
1837s     )
1837s def test_310_union_field_roundtrip(cl_and_vals_a, cl_and_vals_b, strat):
1837s         """
1837s         Classes with union fields can be unstructured and structured.
1837s         """
1837s         converter = Converter(unstruct_strat=strat)
1837s         cl_a, vals_a, kwargs_a = cl_and_vals_a
1837s         cl_b, _, _ = cl_and_vals_b
1837s         assume(strat is UnstructureStrategy.AS_DICT or not kwargs_a)
1837s         a_field_names = {a.name for a in fields(cl_a)}
1837s         b_field_names = {a.name for a in fields(cl_b)}
1837s         assume(a_field_names)
1837s         assume(b_field_names)
1837s     1837s         common_names = a_field_names & b_field_names
1837s         assume(len(a_field_names) > len(common_names))
1837s     1837s         @define
1837s         class C:
1837s             a: cl_a | cl_b
1837s     1837s         inst = C(a=cl_a(*vals_a, **kwargs_a))
1837s     1837s         if strat is UnstructureStrategy.AS_DICT:
1837s             unstructured = converter.unstructure(inst)
1837s > assert inst == converter.structure(converter.unstructure(unstructured), C) 1837s E AssertionError: assert C(a=HypAttrsC...=frozenset())) == C(a=HypAttrsC...=frozenset()))
1837s E             1837s E             Differing attributes:
1837s E             ['a']
1837s E 1837s E Drill down into differing attribute a: 1837s E a: HypAttrsClass(a=0, _b=0, _d='', e=frozenset(), g=[], _h=nan, _j=0, k=0, m=0, _n='', _p='', q=frozenset()) != HypAttrsClass(a=0, _b=0, _d='', e=frozenset(), g=[], _h=nan, _j=0, k=0, m=0, _n='', _p='', q=frozenset())
1837s E               ...
1837s E 1837s E ...Full output truncated (6 lines hidden), use '-vv' to show 1837s E Class fields: [_CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=1, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=2, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=3, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=4, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=5, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=6, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=7, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=8, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=9, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=10, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=11, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})] 1837s E Attributes: {'a': _CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), '_b': _CountingAttr(counter=1, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='c', metadata={}), '_d': _CountingAttr(counter=2, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), 'e': _CountingAttr(counter=3, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='_f', metadata={}), 'g': _CountingAttr(counter=4, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), '_h': _CountingAttr(counter=5, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='i', metadata={}), '_j': _CountingAttr(counter=6, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), 'k': _CountingAttr(counter=7, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='_l', metadata={}), 'm': _CountingAttr(counter=8, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), '_n': _CountingAttr(counter=9, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='o', metadata={}), '_p': _CountingAttr(counter=10, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), 'q': _CountingAttr(counter=11, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='_r', metadata={})} 1837s E Class fields: [_CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})] 1837s E Attributes: {'a': _CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})}
1837s E           Falsifying example: test_310_union_field_roundtrip(
1837s E # The test always failed when commented parts were varied together.
1837s E               cl_and_vals_a=(tests.typed.HypAttrsClass,
1837s E                (0, 0, '', frozenset(), [], nan),
1837s E {'j': 0, '_l': 0, 'm': 0, 'o': '', 'p': '', '_r': frozenset()}),
1837s E               cl_and_vals_b=(tests.typed.HypAttrsClass,
1837s E                (None,),
1837s E                {}),  # or any other generated value
1837s E strat=UnstructureStrategy.AS_DICT, # or any other generated value
1837s E           )
1837s E           Explanation:
1837s E These lines were always and only run by failing examples: 1837s E /usr/lib/python3/dist-packages/_pytest/_io/terminalwriter.py:250 1837s 1837s C = <class 'tests.test_converter.test_310_union_field_roundtrip.<locals>.C'>
1837s _          = {}
1837s a_field_names = {'_b', '_d', '_h', '_j', '_n', '_p', ...}
1837s b_field_names = {'a'}
1837s cl_a       = <class 'tests.typed.HypAttrsClass'>
1837s cl_and_vals_a = (<class 'tests.typed.HypAttrsClass'>, (0, 0, '', frozenset(), [], nan), {'_l': 0, '_r': frozenset(), 'j': 0, 'm': 0, ...})
1837s cl_and_vals_b = (<class 'tests.typed.HypAttrsClass'>, (None,), {})
1837s cl_b       = <class 'tests.typed.HypAttrsClass'>
1837s common_names = {'a'}
1837s converter  = <cattrs.converters.Converter object at 0x7fe26823eca0>
1837s inst = C(a=HypAttrsClass(a=0, _b=0, _d='', e=frozenset(), g=[], _h=nan, _j=0, k=0, m=0, _n='', _p='', q=frozenset()))
1837s kwargs_a   = {'_l': 0, '_r': frozenset(), 'j': 0, 'm': 0, ...}
1837s strat      = <UnstructureStrategy.AS_DICT: 'asdict'>
1837s unstructured = {'a': {'_b': 0, '_d': '', '_h': nan, '_j': 0, ...}}
1837s vals_a     = (0, 0, '', frozenset(), [], nan)
1837s 1837s tests/test_converter.py:308: AssertionError
1837s ______________________ test_310_optional_field_roundtrip _______________________ 1837s 1837s @pytest.mark.skipif(not is_py310_plus, reason="3.10+ union syntax")
1837s >   @given(simple_typed_classes(defaults=False))
1837s 1837s f = <function given.<locals>.run_test_as_given.<locals>.wrapped_test at 0x7fe2bd203240> 1837s 1837s tests/test_converter.py:344: 1837s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1837s 1837s cl_and_vals = (<class 'tests.typed.HypAttrsClass'>, (nan,), {}) 1837s 1837s @pytest.mark.skipif(not is_py310_plus, reason="3.10+ union syntax")
1837s     @given(simple_typed_classes(defaults=False))
1837s     def test_310_optional_field_roundtrip(cl_and_vals):
1837s         """
1837s Classes with optional fields can be unstructured and structured.
1837s         """
1837s         converter = Converter()
1837s         cl, vals, kwargs = cl_and_vals
1837s     1837s         @define
1837s         class C:
1837s             a: cl | None
1837s     1837s         inst = C(a=cl(*vals, **kwargs))
1837s > assert inst == converter.structure(converter.unstructure(inst), C) 1837s E AssertionError: assert C(a=HypAttrsClass(a=nan)) == C(a=HypAttrsClass(a=nan))
1837s E         1837s E         Differing attributes:
1837s E         ['a']
1837s E         1837s E         Drill down into differing attribute a:
1837s E           a: HypAttrsClass(a=nan) != HypAttrsClass(a=nan)
1837s E           ...
1837s E 1837s E ...Full output truncated (5 lines hidden), use '-vv' to show 1837s E Class fields: [_CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})] 1837s E Attributes: {'a': _CountingAttr(counter=0, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})}
1837s E       Falsifying example: test_310_optional_field_roundtrip(
1837s E           cl_and_vals=(tests.typed.HypAttrsClass, (nan,), {}),
1837s E       )
1837s 1837s C = <class 'tests.test_converter.test_310_optional_field_roundtrip.<locals>.C'>
1837s cl         = <class 'tests.typed.HypAttrsClass'>
1837s cl_and_vals = (<class 'tests.typed.HypAttrsClass'>, (nan,), {})
1837s converter  = <cattrs.converters.Converter object at 0x7fe2a060e840>
1837s inst       = C(a=HypAttrsClass(a=nan))
1837s kwargs     = {}
1837s vals       = (nan,)
1837s 1837s tests/test_converter.py:357: AssertionError
1837s _________________________ test_omit_default_roundtrip __________________________
1837s 1837s     @given(simple_typed_classes(defaults=True))
1837s >   def test_omit_default_roundtrip(cl_and_vals):
1837s 1837s f = <function given.<locals>.run_test_as_given.<locals>.wrapped_test at 0x7fe2bd294040> 1837s 1837s tests/test_converter.py:366: 1837s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1837s 1837s cl_and_vals = (<class 'tests.typed.HypAttrsClass'>, ({}, nan), {})
1837s 1837s     @given(simple_typed_classes(defaults=True))
1837s     def test_omit_default_roundtrip(cl_and_vals):
1837s         """
1837s         Omit default on the converter works.
1837s         """
1837s         converter = Converter(omit_if_default=True)
1837s         cl, vals, kwargs = cl_and_vals
1837s     1837s         @define
1837s         class C:
1837s             a: int = 1
1837s             b: cl = Factory(lambda: cl(*vals, **kwargs))
1837s     1837s         inst = C()
1837s         unstructured = converter.unstructure(inst)
1837s >       assert unstructured == {}
1837s E       AssertionError: assert {'b': {'_b': nan}} == {}
1837s E         1837s E         Left contains 1 more item:
1837s E         {'b': {'_b': nan}}
1837s E         1837s E         Full diff:
1837s E         - {}
1837s E         + {...
1837s E 1837s E ...Full output truncated (4 lines hidden), use '-vv' to show 1837s E Class fields: [_CountingAttr(counter=0, _default={}, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), _CountingAttr(counter=1, _default=0.0, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})] 1837s E Attributes: {'a': _CountingAttr(counter=0, _default={}, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), '_b': _CountingAttr(counter=1, _default=0.0, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias='c', metadata={})}
1837s E       Falsifying example: test_omit_default_roundtrip(
1837s E           cl_and_vals=(tests.typed.HypAttrsClass, ({}, nan), {}),
1837s E       )
1837s E       Explanation:
1837s E           These lines were always and only run by failing examples:
1837s E /usr/lib/python3/dist-packages/_pytest/_io/pprint.py:128 1837s 1837s C = <class 'tests.test_converter.test_omit_default_roundtrip.<locals>.C'>
1837s cl         = <class 'tests.typed.HypAttrsClass'>
1837s cl_and_vals = (<class 'tests.typed.HypAttrsClass'>, ({}, nan), {})
1837s converter  = <cattrs.converters.Converter object at 0x7fe2a0585260>
1837s inst       = C(a=1, b=HypAttrsClass(a={}, _b=nan))
1837s kwargs     = {}
1837s unstructured = {'b': {'_b': nan}}
1837s vals       = ({}, nan)
1837s 1837s tests/test_converter.py:380: AssertionError
1837s ____________________ test_unmodified_generated_structuring _____________________
1837s 1837s     @given(
1837s >       cl_and_vals=nested_typed_classes()
1837s         | simple_typed_classes()
1837s         | simple_typed_dataclasses(),
1837s         dv=...,
1837s     )
1837s 1837s f = <function given.<locals>.run_test_as_given.<locals>.wrapped_test at 0x7fe2bcfafa60> 1837s 1837s tests/test_gen_dict.py:166: 1837s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1837s 1837s cl_and_vals = (<class 'tests.typed.HypClass'>, ([HypClass(a=nan)],), {})
1837s dv = False
1837s 1837s     @given(
1837s         cl_and_vals=nested_typed_classes()
1837s         | simple_typed_classes()
1837s         | simple_typed_dataclasses(),
1837s         dv=...,
1837s     )
1837s     def test_unmodified_generated_structuring(cl_and_vals, dv: bool):
1837s         converter = Converter(detailed_validation=dv)
1837s         cl, vals, kwargs = cl_and_vals
1837s fn = make_dict_structure_fn(cl, converter, _cattrs_detailed_validation=dv)
1837s     1837s         inst = cl(*vals, **kwargs)
1837s     1837s         unstructured = converter.unstructure(inst)
1837s     1837s         assert "Hyp" not in repr(unstructured)
1837s     1837s         converter.register_structure_hook(cl, fn)
1837s     1837s         res = converter.structure(unstructured, cl)
1837s     1837s >       assert inst == res
1837s E AssertionError: assert HypClass(a=[HypClass(a=nan)]) == HypClass(a=[HypClass(a=nan)])
1837s E         1837s E         Differing attributes:
1837s E         ['a']
1837s E         1837s E         Drill down into differing attribute a:
1837s E           a: [HypClass(a=nan)] != [HypClass(a=nan)]
1837s E           At index 0 diff: HypClass(a=nan) != HypClass(a=nan)...
1837s E 1837s E ...Full output truncated (5 lines hidden), use '-vv' to show
1837s E       Falsifying example: test_unmodified_generated_structuring(
1837s E cl_and_vals=(tests.typed.HypClass, ([HypClass(a=nan)],), {}),
1837s E           dv=False,  # or any other generated value
1837s E       )
1837s E       Explanation:
1837s E           These lines were always and only run by failing examples:
1837s E /usr/lib/python3/dist-packages/_pytest/_io/terminalwriter.py:250
1837s 1837s cl         = <class 'tests.typed.HypClass'>
1837s cl_and_vals = (<class 'tests.typed.HypClass'>, ([HypClass(a=nan)],), {})
1837s converter  = <cattrs.converters.Converter object at 0x7fe27167c680>
1837s dv         = False
1837s fn         = <function structure_HypClass at 0x7fe2856d6d40>
1837s inst       = HypClass(a=[HypClass(a=nan)])
1837s kwargs     = {}
1837s res        = HypClass(a=[HypClass(a=nan)])
1837s unstructured = {'a': [{'a': nan}]}
1837s vals       = ([HypClass(a=nan)],)
1837s 1837s tests/test_gen_dict.py:186: AssertionError
1837s ___________________ test_structure_simple_from_dict_default ____________________ 1837s 1837s @given(simple_classes(defaults=True, min_attrs=1, frozen=False), data())
1837s >   def test_structure_simple_from_dict_default(cl_and_vals, data):
1837s 1837s f = <function given.<locals>.run_test_as_given.<locals>.wrapped_test at 0x7fe2bcfd3ba0> 1837s 1837s tests/test_structure_attrs.py:31: 1837s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1837s 1837s cl_and_vals = (<class 'tests.untyped.HypClass'>, (0, 0, 0.0), {})
1837s data = data(...)
1837s 1837s @given(simple_classes(defaults=True, min_attrs=1, frozen=False), data())
1837s     def test_structure_simple_from_dict_default(cl_and_vals, data):
1837s """Test structuring non-nested attrs classes with default value."""
1837s         converter = BaseConverter()
1837s         cl, vals, kwargs = cl_and_vals
1837s         obj = cl(*vals, **kwargs)
1837s attrs_with_defaults = [a for a in fields(cl) if a.default is not NOTHING]
1837s         to_remove = data.draw(
1837s lists(elements=sampled_from(attrs_with_defaults), unique=True)
1837s         )
1837s     1837s         for a in to_remove:
1837s             if isinstance(a.default, Factory):
1837s                 setattr(obj, a.name, a.default.factory())
1837s             else:
1837s                 setattr(obj, a.name, a.default)
1837s     1837s         dumped = asdict(obj)
1837s     1837s         for a in to_remove:
1837s             del dumped[a.name]
1837s     1837s >       assert obj == converter.structure(dumped, cl)
1837s E AssertionError: assert HypClass(a=0, _b=0, c=nan) == HypClass(a=0, _b=0, c=nan)
1837s E         1837s E         Omitting 2 identical items, use -vv to show
1837s E         Differing attributes:
1837s E         ['c']
1837s E         1837s E         Drill down into differing attribute c:
1837s E           c: nan != nan
1837s E       Falsifying example: test_structure_simple_from_dict_default(
1837s E           cl_and_vals=(tests.untyped.HypClass, (0, 0, 0.0), {}),
1837s E           data=data(...),
1837s E       )
1837s E Draw 1: [Attribute(name='a', default=0, validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False, inherited=False, on_setattr=None, alias='a'), 1837s E Attribute(name='c', default=nan, validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False, inherited=False, on_setattr=None, alias='c')] 1837s 1837s a = Attribute(name='c', default=nan, validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=Non...True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False, inherited=False, on_setattr=None, alias='c') 1837s attrs_with_defaults = [Attribute(name='a', default=0, validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None...rue, metadata=mappingproxy({}), type=None, converter=None, kw_only=False, inherited=False, on_setattr=None, alias='c')]
1837s cl         = <class 'tests.untyped.HypClass'>
1837s cl_and_vals = (<class 'tests.untyped.HypClass'>, (0, 0, 0.0), {})
1837s converter = <cattrs.converters.BaseConverter object at 0x7fe27e2ebac0>
1837s data       = data(...)
1837s dumped     = {'_b': 0}
1837s kwargs     = {}
1837s obj        = HypClass(a=0, _b=0, c=nan)
1837s to_remove = [Attribute(name='a', default=0, validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None...rue, metadata=mappingproxy({}), type=None, converter=None, kw_only=False, inherited=False, on_setattr=None, alias='c')]
1837s vals       = (0, 0, 0.0)
1837s 1837s tests/test_structure_attrs.py:52: AssertionError
1837s =============================== warnings summary ===============================
1837s tests/typed.py:417
1837s /tmp/autopkgtest-lxc.znzoubjy/downtmp/autopkgtest_tmp/build/tests/typed.py:417: HypothesisWarning: Return-type annotation is `st.SearchStrategy[typing.Tuple[attr._make._CountingAttr, st.SearchStrategy]]`, but the decorated function should return a value (not a strategy)
1837s     @composite
1837s 1837s tests/typed.py:826
1837s /tmp/autopkgtest-lxc.znzoubjy/downtmp/autopkgtest_tmp/build/tests/typed.py:826: HypothesisWarning: Return-type annotation is `st.SearchStrategy[typing.Tuple[typing.Type, st.SearchStrategy[typing.Tuple[typing.Any]], st.SearchStrategy[typing.Dict[str, typing.Any]]]]`, but the decorated function should return a value (not a strategy)
1837s     @composite
1837s 1837s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 1837s =========================== short test summary info ============================ 1837s FAILED tests/test_baseconverter.py::test_simple_roundtrip - AssertionError: a... 1837s FAILED tests/test_baseconverter.py::test_simple_roundtrip_defaults - Assertio... 1837s FAILED tests/test_baseconverter.py::test_nested_roundtrip - AssertionError: a... 1837s FAILED tests/test_baseconverter.py::test_union_field_roundtrip - ExceptionGro... 1837s FAILED tests/test_baseconverter.py::test_310_union_field_roundtrip - Exceptio... 1837s FAILED tests/test_baseconverter.py::test_optional_field_roundtrip - Assertion... 1837s FAILED tests/test_baseconverter.py::test_310_optional_field_roundtrip - Asser... 1837s FAILED tests/test_converter.py::test_simple_roundtrip_defaults - AssertionErr... 1837s FAILED tests/test_converter.py::test_nested_roundtrip - AssertionError: asser... 1837s FAILED tests/test_converter.py::test_nested_roundtrip_tuple - AssertionError:... 1837s FAILED tests/test_converter.py::test_union_field_roundtrip - ExceptionGroup: ... 1837s FAILED tests/test_converter.py::test_310_union_field_roundtrip - AssertionErr... 1837s FAILED tests/test_converter.py::test_310_optional_field_roundtrip - Assertion... 1837s FAILED tests/test_converter.py::test_omit_default_roundtrip - AssertionError:... 1837s FAILED tests/test_gen_dict.py::test_unmodified_generated_structuring - Assert... 1837s FAILED tests/test_structure_attrs.py::test_structure_simple_from_dict_default 1837s ===== 16 failed, 561 passed, 15 xfailed, 2 warnings in 1700.40s (0:28:20) ====== 1838s E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /tmp/autopkgtest-lxc.znzoubjy/downtmp/autopkgtest_tmp/build; python3.12 -m pytest -v --ignore tests/test_unstructure_collections.py --ignore tests/test_preconf.py -k 'not test_orjson' 1838s pybuild-autopkgtest: error: pybuild --autopkgtest --test-pytest -i python{version} -p 3.12 returned exit code 13
1838s make: *** [/tmp/k5oaKzERAi/run:4: pybuild-autopkgtest] Error 25
1838s pybuild-autopkgtest: error: /tmp/k5oaKzERAi/run pybuild-autopkgtest returned exit code 2
1838s autopkgtest [08:38:02]: test pybuild-autopkgtest

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to