コード例 #1
0
ファイル: test_dunders.py プロジェクト: grahamegee/attrs
    def test_underscores(self):
        """
        repr does not strip underscores.
        """
        class C(object):
            __attrs_attrs__ = [simple_attr("_x")]

        C = _add_repr(C)
        i = C()
        i._x = 42

        assert "C(_x=42)" == repr(i)
コード例 #2
0
ファイル: test_dunders.py プロジェクト: euresti/attrs
    def test_underscores(self):
        """
        repr does not strip underscores.
        """
        class C(object):
            __attrs_attrs__ = [simple_attr("_x")]

        C = _add_repr(C)
        i = C()
        i._x = 42

        assert "C(_x=42)" == repr(i)