New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doctest bug #43331
Labels
stdlib
Python modules in the Lib dir
Comments
When i run doctest on the module, i get that error:
[sm@localhost 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:
[sm@localhost 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 ;) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: