This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_sax fails on python 2.2.3 & patch for regrtest.py
Type: Stage:
Components: Library (Lib) Versions: Python 2.2
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: loewis Nosy List: aimacintyre, georg.brandl, loewis, pieterb
Priority: normal Keywords:

Created on 2003-06-21 18:50 by pieterb, last changed 2022-04-10 16:09 by admin. This issue is now closed.

Messages (5)
msg16567 - (view) Author: PieterB (pieterb) Date: 2003-06-21 18:50
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.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



msg16568 - (view) Author: PieterB (pieterb) Date: 2003-06-21 19:00
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
msg16569 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-06-22 17:11
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.
msg16570 - (view) Author: Andrew I MacIntyre (aimacintyre) * (Python triager) Date: 2003-06-23 10:09
Logged In: YES 
user_id=250749

I haven't looked to see what the port is doing, but just
using configure, I find with 2.2.3 on FreeBSD 4.8:-
- test_locale fails becuase "en_US" is not a supported
locale; the test would have to use one of "en_US.US-ASCII",
"en_US.ISO8859-1" or "en_US.ISO8859-15" (I have no idea
which would be most appropriate).

- test_nis will fail if it can't find a NIS master for any
NIS map.

- test_socket_ssl & test_socketserver will be skipped if the
network resource is not enabled.

- test_sax & test_pyexpat both pass.

FreeBSD has its own expat package (which is using expat
1.95.6 on both 4.8 & 5.1).  pyexpat is a separately
selectable package/port.  If you haven't installed the
pyexpat package, or built same from the port, then test_sax
& test_pyexpat are both going to be skipped.

I'm still looking at a couple of other issues with building
on 5.1.

Given that FreeBSD 5.0 was a technology preview not intended
for production use, and a STABLE branch will not be declared
until at least after 5.2 is released, it will not be trivial
to keep track of build issues until release of 5.2.  I am
not in a position to track the FreeBSD 5.x CVS, but I will
try and keep up with releases.

I'm not sure whether anyone has yet stepped in to take Alan
Eldridge's place as maintainer of FreeBSD's ports of Python
& various modules. IMO, many of the issues here should have
been taken up with the Python port maintainer, rather than
being dealt with in Python's tracker (I tried to contact
AlanE about some of this not long before he died).
msg16571 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-02-20 15:27
Logged In: YES 
user_id=849994

Expectations for FreeBSD 5 have been added to regrtest.py.
History
Date User Action Args
2022-04-10 16:09:22adminsetgithub: 38697
2003-06-21 18:50:24pieterbcreate