Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Coders

unit tests in a sorry state

 

 

Zope coders RSS feed   Index | Next | Previous | View Threaded


anthony at interlink

Feb 2, 2005, 4:38 AM

Post #1 of 4 (1493 views)
Permalink
unit tests in a sorry state

There's a number of parts to this email, all of which relate to my
attempts to run Zope2 unit tests under Python 2.3.5c1

These are all with Python 2.3.5c1, built with
gcc version 3.4.3 20050113 (Red Hat 3.4.3-14)
on a Fedora Core box with kernel 2.6.8-1.541
and glibc version 2.3.3-87.

Running Zope 2.7.4's tests under Python 2.3.5c1 has a bunch of
errors, most of which appear to be timezone related.

======================================================================
FAIL: Precision of serial additions
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/anthony/projects/zope/Zope-2.7.4-0/lib/python/DateTime/tests/testDateTime.py",
line 61, in testAddPrecision
dt)
File "/usr/local/lib/python2.3/unittest.py", line 302, in failUnlessEqual
raise self.failureException, \
AssertionError: 2005/02/02 22:54:42.231 US/Eastern

======================================================================
FAIL: Constructor from time float and timezone
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/anthony/projects/zope/Zope-2.7.4-0/lib/python/DateTime/tests/testDateTime.py",
line 89, in testConstructor5
self.assertEqual(str(dt), str(dt1), (dt, dt1))
File "/usr/local/lib/python2.3/unittest.py", line 302, in failUnlessEqual
raise self.failureException, \
AssertionError: (DateTime('2005/02/02 22:54:42.270 US/Eastern'),
DateTime('2005/02/02 06:54:42.270 US/Eastern'))

======================================================================
FAIL: rfc822 conversion
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/anthony/projects/zope/Zope-2.7.4-0/lib/python/DateTime/tests/testDateTime.py",
line 328, in testRFC822
self.assertEqual(dts[5], "%+03d%02d" % divmod( (-offset/60), 60) )
File "/usr/local/lib/python2.3/unittest.py", line 302, in failUnlessEqual
raise self.failureException, \
AssertionError: '-0500' != '+1100'

======================================================================
FAIL: Reconstruction of a DateTime from its parts, with subtraction
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/anthony/projects/zope/Zope-2.7.4-0/lib/python/DateTime/tests/testDateTime.py",
line 138, in testSubtraction
self.assertEqual(dt1, dt3, (dt, dt1, dt2, dt3))
File "/usr/local/lib/python2.3/unittest.py", line 302, in failUnlessEqual
raise self.failureException, \
AssertionError: (DateTime('2005/02/02 22:55:01.852 US/Eastern'),
DateTime('2005/01/30 03:31:08.247 US/Eastern'), DateTime('2005/02/02
22:55:01.852 US/Eastern'), DateTime('2005/01/30 19:31:08.247 US/Eastern'))

======================================================================
FAIL: check7ZODBThreads (ZODB.tests.testFileStorage.FileStorageTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/anthony/projects/zope/Zope-2.7.4-0/lib/python/ZODB/tests/MTStorage.py",
line 217, in check7ZODBThreads
self._checkNThreads(7, ZODBClientThread, db, self)
File
"/home/anthony/projects/zope/Zope-2.7.4-0/lib/python/ZODB/tests/MTStorage.py",
line 206, in _checkNThreads
t.join(60)
File
"/home/anthony/projects/zope/Zope-2.7.4-0/lib/python/ZODB/tests/MTStorage.py",
line 41, in run
self.runtest()
File
"/home/anthony/projects/zope/Zope-2.7.4-0/lib/python/ZODB/tests/MTStorage.py",
line 70, in runtest
self.test.fail()
File "/usr/local/lib/python2.3/unittest.py", line 270, in fail
raise self.failureException, msg
AssertionError

----------------------------------------------------------------------
Ran 2369 tests in 218.883s

FAILED (failures=5)

In addition, we have this warning on a box with PIE, and a Python
running in the top half of the address space:

/home/anthony/projects/zope/Zope-2.7.4-0/lib/python/BTrees/check.py:207:
FutureWarning: %u/%o/%x/%X of negative int will return a signed string in
Python 2.4 and up
return "%s (0x%x)" % (type(obj).__name__, id(obj))
Script (Python):filepath:1: DeprecationWarning: integer argument expected, got
float
/home/anthony/projects/zope/Zope-2.7.4-0/lib/python/ZODB/Connection.py:152:
FutureWarning: %u/%o/%x/%X of negative int will return a signed string in
Python 2.4 and up
return '<Connection at %08x%s>' % (id(self), ver)
/home/anthony/projects/zope/Zope-2.7.4-0/lib/python/ZODB/tests/testTransaction.py:599:
FutureWarning: %u/%o/%x/%X of negative int will return a signed string in
Python 2.4 and up
return "<jar %X %s>" % (id(self), self.errors)

Under svn trunk of Zope2, I get the following error:
Traceback (most recent call last):
File "./test.py", line 920, in ?
process_args()
[...snip...]
File
"/home/anthony/projects/zope/svntrunk/lib/python/Products/PluginIndexes/common/UnIndex.py",
line 91
except:
^
IndentationError: unindent does not match any outer indentation level

This is a trivial error - I don't have write access to the repository any
more, so I can't fix it. add one space to that line.

Running the tests after this killed my machine after something gobbled up
hundreds of megabytes of virtual memory. After a reboot, I set a ulimit on
memorysize to 250MB, I got one breakage, and a bunch of failures (also
timezone related). There were probably other problems after this test aborted,
but I'm not inclined to mess about with it.

======================================================================
ERROR: testSerialization (ZEO.tests.test_cache.CacheTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/anthony/projects/zope/svntrunk/lib/python/ZEO/tests/test_cache.py",
line 138, in testSerialization
dst.write(src.read(self.cache.fc.maxsize))
MemoryError

======================================================================
FAIL: Precision of serial additions
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/anthony/projects/zope/svntrunk/lib/python/DateTime/tests/testDateTime.py",
line 61, in testAddPrecision
dt)
File "/usr/local/lib/python2.3/unittest.py", line 302, in failUnlessEqual
raise self.failureException, \
AssertionError: 2005/02/02 23:22:14.397 US/Eastern

======================================================================
FAIL: Constructor from time float and timezone
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/anthony/projects/zope/svntrunk/lib/python/DateTime/tests/testDateTime.py",
line 89, in testConstructor5
self.assertEqual(str(dt), str(dt1), (dt, dt1))
File "/usr/local/lib/python2.3/unittest.py", line 302, in failUnlessEqual
raise self.failureException, \
AssertionError: (DateTime('2005/02/02 23:22:14.400 US/Eastern'),
DateTime('2005/02/02 07:22:14.400 US/Eastern'))

======================================================================
FAIL: rfc822 conversion
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/anthony/projects/zope/svntrunk/lib/python/DateTime/tests/testDateTime.py",
line 322, in testRFC822
self.assertEqual(dts[5], "%+03d%02d" % divmod( (-offset/60), 60) )
File "/usr/local/lib/python2.3/unittest.py", line 302, in failUnlessEqual
raise self.failureException, \
AssertionError: '-0500' != '+1100'

======================================================================
FAIL: Reconstruction of a DateTime from its parts, with subtraction
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/anthony/projects/zope/svntrunk/lib/python/DateTime/tests/testDateTime.py",
line 138, in testSubtraction
self.assertEqual(dt1, dt3, (dt, dt1, dt2, dt3))
File "/usr/local/lib/python2.3/unittest.py", line 302, in failUnlessEqual
raise self.failureException, \
AssertionError: (DateTime('2005/02/02 23:22:29.181 US/Eastern'),
DateTime('2005/01/30 03:58:35.576 US/Eastern'), DateTime('2005/02/02
23:22:29.181 US/Eastern'), DateTime('2005/01/30 19:58:35.576 US/Eastern'))

----------------------------------------------------------------------
Ran 2713 tests in 281.299s

FAILED (failures=4, errors=1)



--
Anthony Baxter <anthony [at] interlink>
It's never too late to have a happy childhood.
_______________________________________________
Zope-Coders mailing list
Zope-Coders [at] zope
http://mail.zope.org/mailman/listinfo/zope-coders


lists at andreas-jung

Feb 2, 2005, 6:46 AM

Post #2 of 4 (1395 views)
Permalink
Re: unit tests in a sorry state [In reply to]

I tried Python 2.3.5c1 with the latest 2.7 checkout on FC3 and all tests
pass.

-aj

--On Mittwoch, 2. Februar 2005 23:38 Uhr +1100 Anthony Baxter
<anthony [at] interlink> wrote:

> There's a number of parts to this email, all of which relate to my
> attempts to run Zope2 unit tests under Python 2.3.5c1
>
> These are all with Python 2.3.5c1, built with
> gcc version 3.4.3 20050113 (Red Hat 3.4.3-14)
> on a Fedora Core box with kernel 2.6.8-1.541
> and glibc version 2.3.3-87.
>
> Running Zope 2.7.4's tests under Python 2.3.5c1 has a bunch of
> errors, most of which appear to be timezone related.
>
> ======================================================================
> FAIL: Precision of serial additions
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/home/anthony/projects/zope/Zope-2.7.4-0/lib/python/DateTime/tests/testD
> ateTime.py", line 61, in testAddPrecision
> dt)
> File "/usr/local/lib/python2.3/unittest.py", line 302, in
> failUnlessEqual raise self.failureException, \
> AssertionError: 2005/02/02 22:54:42.231 US/Eastern
>
> ======================================================================
> FAIL: Constructor from time float and timezone
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/home/anthony/projects/zope/Zope-2.7.4-0/lib/python/DateTime/tests/testD
> ateTime.py", line 89, in testConstructor5
> self.assertEqual(str(dt), str(dt1), (dt, dt1))
> File "/usr/local/lib/python2.3/unittest.py", line 302, in
> failUnlessEqual raise self.failureException, \
> AssertionError: (DateTime('2005/02/02 22:54:42.270 US/Eastern'),
> DateTime('2005/02/02 06:54:42.270 US/Eastern'))
>
> ======================================================================
> FAIL: rfc822 conversion
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/home/anthony/projects/zope/Zope-2.7.4-0/lib/python/DateTime/tests/testD
> ateTime.py", line 328, in testRFC822
> self.assertEqual(dts[5], "%+03d%02d" % divmod( (-offset/60), 60) )
> File "/usr/local/lib/python2.3/unittest.py", line 302, in
> failUnlessEqual raise self.failureException, \
> AssertionError: '-0500' != '+1100'
>
> ======================================================================
> FAIL: Reconstruction of a DateTime from its parts, with subtraction
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/home/anthony/projects/zope/Zope-2.7.4-0/lib/python/DateTime/tests/testD
> ateTime.py", line 138, in testSubtraction
> self.assertEqual(dt1, dt3, (dt, dt1, dt2, dt3))
> File "/usr/local/lib/python2.3/unittest.py", line 302, in
> failUnlessEqual raise self.failureException, \
> AssertionError: (DateTime('2005/02/02 22:55:01.852 US/Eastern'),
> DateTime('2005/01/30 03:31:08.247 US/Eastern'), DateTime('2005/02/02
> 22:55:01.852 US/Eastern'), DateTime('2005/01/30 19:31:08.247 US/Eastern'))
>
> ======================================================================
> FAIL: check7ZODBThreads (ZODB.tests.testFileStorage.FileStorageTests)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/home/anthony/projects/zope/Zope-2.7.4-0/lib/python/ZODB/tests/MTStorage
> .py", line 217, in check7ZODBThreads
> self._checkNThreads(7, ZODBClientThread, db, self)
> File
> "/home/anthony/projects/zope/Zope-2.7.4-0/lib/python/ZODB/tests/MTStorage
> .py", line 206, in _checkNThreads
> t.join(60)
> File
> "/home/anthony/projects/zope/Zope-2.7.4-0/lib/python/ZODB/tests/MTStorage
> .py", line 41, in run
> self.runtest()
> File
> "/home/anthony/projects/zope/Zope-2.7.4-0/lib/python/ZODB/tests/MTStorage
> .py", line 70, in runtest
> self.test.fail()
> File "/usr/local/lib/python2.3/unittest.py", line 270, in fail
> raise self.failureException, msg
> AssertionError
>
> ----------------------------------------------------------------------
> Ran 2369 tests in 218.883s
>
> FAILED (failures=5)
>
> In addition, we have this warning on a box with PIE, and a Python
> running in the top half of the address space:
>
> /home/anthony/projects/zope/Zope-2.7.4-0/lib/python/BTrees/check.py:207:
> FutureWarning: %u/%o/%x/%X of negative int will return a signed string in
> Python 2.4 and up
> return "%s (0x%x)" % (type(obj).__name__, id(obj))
> Script (Python):filepath:1: DeprecationWarning: integer argument
> expected, got float
> /home/anthony/projects/zope/Zope-2.7.4-0/lib/python/ZODB/Connection.py:15
> 2: FutureWarning: %u/%o/%x/%X of negative int will return a signed
> string in Python 2.4 and up
> return '<Connection at %08x%s>' % (id(self), ver)
> /home/anthony/projects/zope/Zope-2.7.4-0/lib/python/ZODB/tests/testTransa
> ction.py:599: FutureWarning: %u/%o/%x/%X of negative int will return a
> signed string in Python 2.4 and up
> return "<jar %X %s>" % (id(self), self.errors)
>
> Under svn trunk of Zope2, I get the following error:
> Traceback (most recent call last):
> File "./test.py", line 920, in ?
> process_args()
> [...snip...]
> File
> "/home/anthony/projects/zope/svntrunk/lib/python/Products/PluginIndexes/c
> ommon/UnIndex.py", line 91
> except:
> ^
> IndentationError: unindent does not match any outer indentation level
>
> This is a trivial error - I don't have write access to the repository any
> more, so I can't fix it. add one space to that line.
>
> Running the tests after this killed my machine after something gobbled up
> hundreds of megabytes of virtual memory. After a reboot, I set a ulimit
> on memorysize to 250MB, I got one breakage, and a bunch of failures (also
> timezone related). There were probably other problems after this test
> aborted, but I'm not inclined to mess about with it.
>
> ======================================================================
> ERROR: testSerialization (ZEO.tests.test_cache.CacheTests)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/home/anthony/projects/zope/svntrunk/lib/python/ZEO/tests/test_cache.py"
> , line 138, in testSerialization
> dst.write(src.read(self.cache.fc.maxsize))
> MemoryError
>
> ======================================================================
> FAIL: Precision of serial additions
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/home/anthony/projects/zope/svntrunk/lib/python/DateTime/tests/testDateT
> ime.py", line 61, in testAddPrecision
> dt)
> File "/usr/local/lib/python2.3/unittest.py", line 302, in
> failUnlessEqual raise self.failureException, \
> AssertionError: 2005/02/02 23:22:14.397 US/Eastern
>
> ======================================================================
> FAIL: Constructor from time float and timezone
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/home/anthony/projects/zope/svntrunk/lib/python/DateTime/tests/testDateT
> ime.py", line 89, in testConstructor5
> self.assertEqual(str(dt), str(dt1), (dt, dt1))
> File "/usr/local/lib/python2.3/unittest.py", line 302, in
> failUnlessEqual raise self.failureException, \
> AssertionError: (DateTime('2005/02/02 23:22:14.400 US/Eastern'),
> DateTime('2005/02/02 07:22:14.400 US/Eastern'))
>
> ======================================================================
> FAIL: rfc822 conversion
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/home/anthony/projects/zope/svntrunk/lib/python/DateTime/tests/testDateT
> ime.py", line 322, in testRFC822
> self.assertEqual(dts[5], "%+03d%02d" % divmod( (-offset/60), 60) )
> File "/usr/local/lib/python2.3/unittest.py", line 302, in
> failUnlessEqual raise self.failureException, \
> AssertionError: '-0500' != '+1100'
>
> ======================================================================
> FAIL: Reconstruction of a DateTime from its parts, with subtraction
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/home/anthony/projects/zope/svntrunk/lib/python/DateTime/tests/testDateT
> ime.py", line 138, in testSubtraction
> self.assertEqual(dt1, dt3, (dt, dt1, dt2, dt3))
> File "/usr/local/lib/python2.3/unittest.py", line 302, in
> failUnlessEqual raise self.failureException, \
> AssertionError: (DateTime('2005/02/02 23:22:29.181 US/Eastern'),
> DateTime('2005/01/30 03:58:35.576 US/Eastern'), DateTime('2005/02/02
> 23:22:29.181 US/Eastern'), DateTime('2005/01/30 19:58:35.576 US/Eastern'))
>
> ----------------------------------------------------------------------
> Ran 2713 tests in 281.299s
>
> FAILED (failures=4, errors=1)
>
>
>
> --
> Anthony Baxter <anthony [at] interlink>
> It's never too late to have a happy childhood.
> _______________________________________________
> Zope-Coders mailing list
> Zope-Coders [at] zope
> http://mail.zope.org/mailman/listinfo/zope-coders




_______________________________________________
Zope-Coders mailing list
Zope-Coders [at] zope
http://mail.zope.org/mailman/listinfo/zope-coders


anthony at interlink

Feb 2, 2005, 7:04 AM

Post #3 of 4 (1415 views)
Permalink
Re: unit tests in a sorry state [In reply to]

On Thursday 03 February 2005 01:46, Andreas Jung wrote:
> I tried Python 2.3.5c1 with the latest 2.7 checkout on FC3 and all tests
> pass.

Well, I'd love to know why they're failing for me. They look like hardcoded
timezones to me...


--
Anthony Baxter <anthony [at] interlink>
It's never too late to have a happy childhood.
_______________________________________________
Zope-Coders mailing list
Zope-Coders [at] zope
http://mail.zope.org/mailman/listinfo/zope-coders


abo at minkirri

Feb 2, 2005, 3:15 PM

Post #4 of 4 (1402 views)
Permalink
Re: unit tests in a sorry state [In reply to]

On Thu, 2005-02-03 at 02:04 +1100, Anthony Baxter wrote:
> On Thursday 03 February 2005 01:46, Andreas Jung wrote:
> > I tried Python 2.3.5c1 with the latest 2.7 checkout on FC3 and all tests
> > pass.
>
> Well, I'd love to know why they're failing for me. They look like hardcoded
> timezones to me...

Just ran the tests for 2.7.4 and got 12 failures. Looks like Timezones
might be an issue. We set and export the TZ variable to
"AEST-10AEDT-11,M10.5.0,M3.5.0" to make our timezone work properly
(Australia/Melbourne, there is a long standing problem with Zope's
DataTime that makes it fail to recognise many timezones without setting
the TZ variable to force it). The errors we are getting are;

======================================================================
FAIL: Constructor from date/time string
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/abo/lib/Zope-2.7.4/lib/python/DateTime/tests/testDateTime.py",
line 77, in testConstructor3
self.assertEqual(repr(dt),repr(dt1))
File "/usr/lib/python2.3/unittest.py", line 302, in failUnlessEqual
raise self.failureException, \
AssertionError: "DateTime('2005/02/03 09:57:11.652 GMT+1100')" !=
"DateTime('2005/02/03 09:57:11.652 GMT+11')"


We are also getting a few errors like;

======================================================================
FAIL: checkError (zLOG.tests.testzLog.EventLogTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/abo/lib/Zope-2.7.4/lib/python/zLOG/tests/testzLog.py",
line 153, in checkError
self.verifyEntry(f, subsys="basic", summary="summary")
File "/home/abo/lib/Zope-2.7.4/lib/python/zLOG/tests/testzLog.py",
line 86, in verifyEntry
self.fail("can't find entry in log file")
File "/usr/lib/python2.3/unittest.py", line 270, in fail
raise self.failureException, msg
AssertionError: can't find entry in log file


--
Donovan Baarda <abo [at] minkirri>
http://minkirri.apana.org.au/~abo/

_______________________________________________
Zope-Coders mailing list
Zope-Coders [at] zope
http://mail.zope.org/mailman/listinfo/zope-coders

Zope coders RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.