From: Gerhard <ger...@gm...> - 2002-05-20 21:55:26
|
* Steve Waterbury <ste...@gs...> [2002-05-20 17:32 -0400]: > Gerhard Häring wrote: > > > > Really strange. Let's try to find out what happened: > > > > You can start Python with "python -v" and then "import unittest". This > > should show which unittest.py is really loaded. It should look about > > like: > > > > >>> import unittest > > # /usr/local/lib/python2.2/unittest.pyc matches > > # /usr/local/lib/python2.2/unittest.py > > [...] > > > > Then you can use "print unittest.__version__" to see the revision number > > of the module. > > Here's what I get: > > --------------------------------------------------------------- > > [waterbug@beeblebrox pypgsql-2.0]$ python > Python 2.2.1 (#1, Apr 18 2002, 01:54:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> > [waterbug@beeblebrox pypgsql-2.0]$ python -v > [...] > >>> import unittest > # /usr/local/lib/python2.2/site-packages/unittest.pyc matches /usr/local/lib/python2.2/site-packages/unittest.py > import unittest # precompiled from /usr/local/lib/python2.2/site-packages/unittest.pyc > [...] > >>> print unittest.__version__ > 1.1.1.1 I couldn't find this version in either the pyunit or Python CVS repositories. You found a very strange version of pyunit somewhere ;-) > I'm hoping that means they didn't bother to populate __version__ > correctly! ;^) I'm not sure where you got that unittest.py from, but it's apparently not from pyunit 1.4 (__version__ == "1.40"), or Python 2.2.1 (__version__ == "1.14"). Looks like you only need to place the original Python 2.2.1 unittest.py (is most recent available) there again. The __version__ thing is indeed confusing, as it depends on wether you use pyunit from Python or from the pyunit project itself. All it really marks, however, is the revision number of the file in the respective CVS repository. Gerhard -- mail: gerhard <at> bigfoot <dot> de registered Linux user #64239 web: http://www.cs.fhm.edu/~ifw00065/ OpenPGP public key id AD24C930 public key fingerprint: 3FCC 8700 3012 0A9E B0C9 3667 814B 9CAA AD24 C930 reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b'))) |