MCPcopy
hub / github.com/python-attrs/attrs / test_repr

Method test_repr

tests/test_make.py:1999–2032  ·  view source on GitHub ↗

repr of builder itself makes sense.

(self)

Source from the content-addressed store, hash-verified

1997 ) == ei.value.args
1998
1999 def test_repr(self):
2000 """
2001 repr of builder itself makes sense.
2002 """
2003
2004 class C:
2005 pass
2006
2007 b = _ClassBuilder(
2008 C,
2009 None,
2010 True,
2011 ClassProps(
2012 is_exception=False,
2013 is_slotted=True,
2014 is_frozen=True,
2015 added_init=True,
2016 added_repr=True,
2017 added_eq=True,
2018 added_ordering=False,
2019 hashability=ClassProps.Hashability.UNHASHABLE,
2020 added_match_args=True,
2021 kw_only=ClassProps.KeywordOnly.NO,
2022 has_weakref_slot=False,
2023 collected_fields_by_mro=True,
2024 added_str=False,
2025 added_pickling=True,
2026 on_setattr_hook=None,
2027 field_transformer=None,
2028 ),
2029 has_custom_setattr=False,
2030 )
2031
2032 assert "<_ClassBuilder(cls=C)>" == repr(b)
2033
2034 def test_returns_self(self):
2035 """

Callers

nothing calls this directly

Calls 2

_ClassBuilderClass · 0.90
ClassPropsClass · 0.90

Tested by

no test coverage detected