Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r88826:1e7540052811 Date: 2016-12-02 17:25 +0100 http://bitbucket.org/pypy/pypy/changeset/1e7540052811/
Log: Test and fix: type names diff --git a/pypy/interpreter/test/test_special.py b/pypy/interpreter/test/test_special.py --- a/pypy/interpreter/test/test_special.py +++ b/pypy/interpreter/test/test_special.py @@ -4,9 +4,11 @@ def test_Ellipsis(self): assert Ellipsis == Ellipsis assert repr(Ellipsis) == 'Ellipsis' + assert Ellipsis.__class__.__name__ == 'ellipsis' def test_NotImplemented(self): def f(): return NotImplemented assert f() == NotImplemented assert repr(NotImplemented) == 'NotImplemented' + assert NotImplemented.__class__.__name__ == 'NotImplementedType' diff --git a/pypy/interpreter/typedef.py b/pypy/interpreter/typedef.py --- a/pypy/interpreter/typedef.py +++ b/pypy/interpreter/typedef.py @@ -770,12 +770,12 @@ ) assert not Cell.typedef.acceptable_as_base_class # no __new__ -Ellipsis.typedef = TypeDef("Ellipsis", +Ellipsis.typedef = TypeDef("ellipsis", __repr__ = interp2app(Ellipsis.descr__repr__), ) assert not Ellipsis.typedef.acceptable_as_base_class # no __new__ -NotImplemented.typedef = TypeDef("NotImplemented", +NotImplemented.typedef = TypeDef("NotImplementedType", __repr__ = interp2app(NotImplemented.descr__repr__), ) assert not NotImplemented.typedef.acceptable_as_base_class # no __new__ _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit