[Python-bugs-list] [ python-Bugs-758504 ] test_sax fails on python 2.2.3 & patch for regrtest.py

SourceForge.net noreply@sourceforge.net
Sun, 22 Jun 2003 10:11:57 -0700


Bugs item #758504, was opened at 2003-06-21 20:50
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=758504&group_id=5470

Category: Python Library
Group: Python 2.2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: PieterB (pieterb)
>Assigned to: Martin v. Löwis (loewis)
Summary: test_sax fails on python 2.2.3 & patch for regrtest.py

Initial Comment:
Hi,

1) testing using the FreeBSD ports version of Python 
2.2.3 fails (both on FreeBSD 5 and FreeBSD 4.8). The 
test test_sax.py fails, because test_sax seems to 
require expat2 (?), which isn't available by default on 
FreeBSD).

2) I've also patched regrtest.py so that it works on 
FreeBSD 4/5
(Chimp@IRC tested it on FreeBSD4.8), can somebody
apply the patches from regrtest.py to CVS?
Source: http://www.gewis.nl/~pieterb/python/bugs-
2.2.3/

In detail:

1) testing using the FreeBSD ports version of Python 
2.2.3 failed
==========================================
========================

Using Python 2.2.3 from recent FreeBSD ports
"cd /usr/ports/lang/python ; make ; cd work/Python-
2.2.3 ; make test"
gives:

174 tests OK.
1 test failed:
    test_sax
18 tests skipped:
    test_al test_cd test_cl test_curses 
test_email_codecs test_gdbm
    test_gl test_imgfile test_linuxaudiodev test_locale 
test_nis
    test_pyexpat test_socket_ssl test_socketserver 
test_sunaudiodev
    test_unicode_file test_winreg test_winsound
Ask someone to teach regrtest.py about which tests are
expected to get skipped on freebsd5.
*** Error code 1

Stop in /usr/ports/lang/python/work/Python-2.2.3.

----------------------------------------------------

cd /usr/ports/lang/python/work/Python-2.2.3/Lib/test
../../python test_sax.py
gives:
test_support.TestFailed: 3 of 40 tests failed

...
Expected:
[('start', ('http://xml.python.org/1', 'abc'), 'abc'),
 ('start', ('http://xml.python.org/2', 'def'), 'foo:def'),
 ('end', ('http://xml.python.org/2', 'def'), 'foo:def'),
 ('start', ('http://xml.python.org/1', 'ghi'), 'ghi'),
 ('end', ('http://xml.python.org/1', 'ghi'), 'ghi'),
 ('end', ('http://xml.python.org/1', 'abc'), 'abc')]
Received:
[('start', (u'http://xml.python.org/1', u'abc'), None),
 ('start', (u'http://xml.python.org/2', u'def'), None),
 ('end', (u'http://xml.python.org/2', u'def'), None),
 ('start', (u'http://xml.python.org/1', u'ghi'), None),
 ('end', (u'http://xml.python.org/1', u'ghi'), None),
 ('end', (u'http://xml.python.org/1', u'abc'), None)]
Failed test_expat_nsdecl_pair_diff
Expected:
[('start', ('http://xml.python.org/', 'abc'), 'foo:abc'),
 ('start', ('http://xml.python.org/', 'def'), 'foo:def'),
 ('end', ('http://xml.python.org/', 'def'), 'foo:def'),
 ('start', ('http://xml.python.org/', 'ghi'), 'foo:ghi'),
 ('end', ('http://xml.python.org/', 'ghi'), 'foo:ghi'),
 ('end', ('http://xml.python.org/', 'abc'), 'foo:abc')]
Received:
[('start', (u'http://xml.python.org/', u'abc'), None),
 ('start', (u'http://xml.python.org/', u'def'), None),
 ('end', (u'http://xml.python.org/', u'def'), None),
 ('start', (u'http://xml.python.org/', u'ghi'), None),
 ('end', (u'http://xml.python.org/', u'ghi'), None),
 ('end', (u'http://xml.python.org/', u'abc'), None)]
Failed test_expat_nsdecl_pair_same
Expected:
[('start', ('http://xml.python.org/', 'abc'), 'abc'),
 ('end', ('http://xml.python.org/', 'abc'), 'abc')]
Received:
[('start', (u'http://xml.python.org/', u'abc'), None),
 ('end', (u'http://xml.python.org/', u'abc'), None)]
Failed test_expat_nsdecl_single

I managed to fixed this by patching test_sax.py,
see http://gewis.nl/~pieterb/python/bugs-2.2.3/

2) i've patched regrtest.py so that it works on FreeBSD 
4/5
==========================================
=================
This make it possible to run 'make test' on Python.
It will give the following output:
  175 tests OK.
  18 tests skipped:
    test_al test_cd test_cl test_curses 
test_email_codecs test_gdbm
    test_gl test_imgfile test_linuxaudiodev test_locale 
test_nis
    test_pyexpat test_socket_ssl test_socketserver 
test_sunaudiodev
    test_unicode_file test_winreg test_winsound
  Those skips are all expected on freebsd5.

Can anybody confirm that it's ok to skip those tests.  
Can anybody
download the patched version of regrtest.py from the 
URL above check
it into Python CVS?

Thanks to Chimp@IRC for testing it on FreeBSD4.8
Thanks to itz@irc and others at IRC:#python for their 
help.

PieterB

--
http://zwiki.org/PieterB





----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2003-06-22 19:11

Message:
Logged In: YES 
user_id=21627

I'm unsure why test_locale, test_nis, and test_socket_ssl
would be skipped. 

I'm also surprised test_pyexpat is skipped when test_minidom
is executed. This is impossible.

----------------------------------------------------------------------

Comment By: PieterB (pieterb)
Date: 2003-06-21 21:00

Message:
Logged In: YES 
user_id=458461

See also: http://sourceforge.net/tracker/?
group_id=5470&atid=105470&func=detail&aid=621579

a search on "test_sax" indicates that isn't running on quite a 
lot of other platforms.

PieterB
--
http://zwiki.org/PieterB

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=758504&group_id=5470