[issue7962] Demo/ directory needs to be tested and pruned

Zack Goldstein report at bugs.python.org
Sat May 29 23:16:25 CEST 2010


Zack Goldstein <goldsz at gmail.com> added the comment:

I've started going through the demos. So far I've gone through cgi and classes. If this is what you're looking for I'll try and go through the rest in the next week or so.

Python 3.2a0

/cgi
    all work

/classes
    Complex.py - fail

            1 and Complex(0, 10) -> <class 'TypeError'>
        Traceback (most recent call last):
          File "Complex.py", line 314, in <module>
            test()
          File "Complex.py", line 310, in test
            checkop(*(t+item))
          File "Complex.py", line 235, in checkop
            ok = abs(result - value) <= fuzz
          File "Complex.py", line 184, in __rsub__
            return other - self
          File "Complex.py", line 180, in __sub__
            return Complex(self.re - other.re, self.im - other.im)
        TypeError: unsupported operand type(s) for -: 'type' and 'int'

    Dates.py - fail
     
        Traceback (most recent call last):
          File "Dates.py", line 227, in <module>
            test(1850, 2150)
          File "Dates.py", line 185, in test
            if (not a < b) or a == b or a > b or b != b:
        TypeError: unorderable types: Date() < Date()

    Dbm.py - fail 
        {}
        key: "myKey"
        Traceback (most recent call last):
          File "Dbm.py", line 66, in <module>
            test()
          File "Dbm.py", line 49, in test
            if key in d:
          File "Dbm.py", line 25, in __getitem__
            return eval(self.db[repr(key)])
        KeyError: '0'

    Range.py - fail
        Exception: error in implementation:
        correct   = range(5, 100, 3)
        old-style = [5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59, 62, 65, 68, 71, 74, 77, 80, 83, 86, 89, 92, 95, 98]
        generator = [5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59, 62, 65, 68, 71, 74, 77, 80, 83, 86, 89, 92, 95, 98]

    Rev.py - fail
        1 items had failures:
          10 of  17 in Rev
        ***Test Failed*** 10 failures.

        Looks like mostly invalid print syntax
    
    Vec.py - pass

    bitvec.py - fail
        use of __cmp__()
        use of __*slice__()
        didn't check further

----------
nosy: +goldsz

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7962>
_______________________________________


More information about the Python-bugs-list mailing list