File: test100.py

package info (click to toggle)
pychecker 0.8.19-10
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,484 kB
  • ctags: 2,114
  • sloc: python: 9,968; sh: 98; makefile: 13
file content (15 lines) | stat: -rw-r--r-- 459 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# https://sourceforge.net/tracker/index.php?func=detail&aid=1563494&group_id=24686&atid=382217
# see zope.interface.declarations.Declaration
# for a real-world one line test, pycheck "import zope.interface.declarations"  

'd'
class D:
    'd'
    __bases__ = ()
    
    # this repr avoids getting the default repr, which shows an id
    # which changes between test runs
    __repr__ = classmethod(lambda cls: 'D')

# instantiating triggers the bug
d = D()