Bugs item #1483785, was opened at 2006-05-08 14:53
Message generated for change (Settings changed) made by stnsls
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1483785&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
>Status: Deleted
Resolution: None
Priority: 5
Submitted By: stnsls (stnsls)
Assigned to: Nobody/Anonymous (nobody)
Summary: Doctest bug
Initial Comment:
When i run doctest on the module, i get that error:
[EMAIL PROTECTED] Spyca]$ python Spyca.py
**********************************************************************
File "Spyca.py", line 840, in
__main__.City.Select_all
Failed example:
print City.Select_all(Country.Get_rowid('<default
country>'))
Exception raised:
Traceback (most recent call last):
File "/usr/lib/python2.4/doctest.py", line
1243, in __run
compileflags, 1) in test.globs
File "<doctest __main__.City.Select_all[0]>",
line 1, in ?
print
City.Select_all(Country.Get_rowid('<default
country>'))
File "Spyca.py", line 846, in Select_all
return [cls(i) for i in
Db.Exec(sql).fetchall()]
File "Spyca.py", line 760, in __init__
elif isinstance(this, tuple) or
isinstance(this, list): self.Select_seq(this)
File "Spyca.py", line 817, in Select_seq
if not isinstance(seq[3], Latitude): raise
SpycaException(SpycaInitError, type(seq[3]))
SpycaException: Instanciation or argument error.
[<type 'unicode'>]
**********************************************************************
1 items had failures:
1 of 1 in __main__.City.Select_all
***Test Failed*** 1 failures.
Now, when i do all the same in the interpreter:
[EMAIL PROTECTED] Spyca]$ python
Python 2.4.1 (#2, Aug 25 2005, 18:20:57)
[GCC 4.0.1 (4.0.1-2mdk for Mandriva Linux release
2006.0)] on linux2
Type "help", "copyright", "credits" or "license" for
more information.
>>> import Spyca as S
>>> lat = S.Latitude()
>>> lon = S.Longitude()
>>> seq = (None, 'myCity', None, lat, lon, 0, '')
>>> c = S.City(seq)
>>> print c
myCity
>>> repr(c)
"[None, 'myCity', None, [0, 0 ,0, 0.0], [0, 0 ,0,
0.0], 0, '']"
>>>
As you can see, no error in the interpreter.
--------
Have a nice day. Thanks for the best scripting
language ;)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1483785&group_id=5470
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com