-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tim Peters wrote:

| [Tres Seaver]
|
|>Unit tests for Zope 2.7.4's 'zdaemon' package, which passed under Python
|>2.4, now fail under 2.4.1c1:
|
|
| Are you sure they passed under 2.4?

Yep.  I showed output from that in the original post (and below).

|  Derrick Hudson changed run() to
| _run() in the SVN version of zdaemon way back on Jan 19, with this
| checkin comment:
|
|      Log message for revision 28881:
|      Renamed run() method to _run().  Python 2.4's unittest.TestCase class
|      defines all of the test logic in the run() method instead of in
__call__()
|      (as 2.3 did).  The rename prevents overriding the base
implementation and
|      causing the tests to fail.
|
|      Changed:
|      U   Zope3/trunk/src/zdaemon/tests/testzdrun.py
|
| I then ported that to where it belonged (zdaemon isn't part of Zope3
| under SVN, it's stitched in to Zope3, from time to time, from the
| distinct zdaemon SVN trunk).
|
| I suppose that never got ported to the CVS version -- well, until
| today, cuz it looks like Stefan Holek checked in the same kinds of
| changes to testzdrun.py about 2.5 hours ago.

Right.  In fact, he beat me to the commit, and gave me a nice CVS
conflict as lagniappe.

| [BTW, the zdaemon tests don't run at all on Windows, so I'll never
| notice anything wrong with them]
|
|
|>$ uname -a
|>Linux secretariat 2.6.8.1-5-686 #1 Sat Feb 12 00:50:37 UTC 2005 i686 \
|>GNU/Linux
|>$ ../Python-2.4/python test.py -v zdaemon
|>Running unit tests at level 1
|>Running unit tests from
|>/home/tseaver/projects/Zope-CVS/Zope-2.7.4/lib/python
|>/home/tseaver/projects/Zope-CVS/Python-2.4/Lib/whrandom.py:38:
|>DeprecationWarning: the whrandom module is deprecated; please use the
|>random module
|>~  DeprecationWarning)
|>............................
|>- ----------------------------------------------------------------------
|>Ran 28 tests in 2.278s
|>
|>OK
|>$ ../Python-2.4.1c1/python test.py -v zdaemon
|>Running unit tests at level 1
|>Running unit tests from
|>/home/tseaver/projects/Zope-CVS/Zope-2.7.4/lib/python
|>/home/tseaver/projects/Zope-CVS/Python-2.4.1c1/Lib/whrandom.py:38:
|>DeprecationWarning: the whrandom module is deprecated; please use the
|>random module
|>~  DeprecationWarning)
|>...................Traceback (most recent call last):
|>~  File "test.py", line 918, in ?
|>~    process_args()
|>~  File "test.py", line 908, in process_args
|>~    bad = main(module_filter, test_filter, libdir)
|>~  File "test.py", line 698, in main
|>~    runner(files, test_filter, debug)
|>~  File "test.py", line 599, in runner
|>~    r = runner.run(suite)
|>~  File "test.py", line 366, in run
|>~    return unittest.TextTestRunner.run(self, test)
|>~  File "/home/tseaver/projects/Zope-CVS/Python-2.4.1c1/Lib/unittest.py",
|>line 696, in run
|>~    test(result)
|>~  File "/home/tseaver/projects/Zope-CVS/Python-2.4.1c1/Lib/unittest.py",
|>line 428, in __call__
|>~    return self.run(*args, **kwds)
|>~  File "/home/tseaver/projects/Zope-CVS/Python-2.4.1c1/Lib/unittest.py",
|>line 424, in run
|>~    test(result)
|>~  File "/home/tseaver/projects/Zope-CVS/Python-2.4.1c1/Lib/unittest.py",
|>line 428, in __call__
|>~    return self.run(*args, **kwds)
|>~  File "/home/tseaver/projects/Zope-CVS/Python-2.4.1c1/Lib/unittest.py",
|>line 424, in run
|>~    test(result)
|>~  File "/home/tseaver/projects/Zope-CVS/Python-2.4.1c1/Lib/unittest.py",
|>line 428, in __call__
|>~    return self.run(*args, **kwds)
|>~  File "/home/tseaver/projects/Zope-CVS/Python-2.4.1c1/Lib/unittest.py",
|>line 424, in run
|>~    test(result)
|>~  File "/home/tseaver/projects/Zope-CVS/Python-2.4.1c1/Lib/unittest.py",
|>line 281, in __call__
|>~    return self.run(*args, **kwds)
|>~  File
|>"/home/tseaver/projects/Zope-CVS/Zope-2.7.4/lib/python/zdaemon/tests/testzdrun.py",
|>line 97, in run
|>~    zdctl.main(["-s", self.zdsock] + args)
|>AttributeError: 'ZDaemonTests' object has no attribute 'zdsock'
|>
|>By staring at the code of the failing test, it looks like the MRO of the
|>testcase class has changed:  it declares a 'run' method, which is
|>supposed to run the external process, which clashes with the 'run'
|>method of unittest.TestCase.  I don't know what change in the 2.4 ->
|>2.4.1c1 update would have mucked with the MRO (if a MRO issue is
involved).
|>
|>Tres.
|
|
| Pretty baffling.  I assume that if you did "cvs up", the test would
| pass now (because of Stefan's recent checkin).
|
| Sounds anyway like an unintended unittest incompatibility snuck in
| somewhere between 2.3 and 2.4.

I think somebody tweaked either the base classes of unittest.TestCase or
else the MRO algoritm (if it *is* algorithmic, that is ;)


Tres. - -- =============================================================== Tres Seaver [EMAIL PROTECTED] Zope Corporation "Zope Dealers" http://www.zope.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCMLekGqWXf00rNCgRAofeAJ9nEbAMmklXhH3BpRzihinTVFuiiQCfZA2q
EwBLgXghI8WLJVmwoRMQxxA=
=nAjP
-----END PGP SIGNATURE-----
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to