I'm an admitted newb trying to enter the Python community and use Python
significantly (versus occassionally). dockets seems to be much more powerful
than I can figure out how to tap.
I have a function inside a file that's an embedded test that (currently) works
fine. However, the package has
On 27/11/12 08:06, Albert-Jan Roskam wrote:
Hi,
I am using doctest and I am struggling with newlines characters
(see below). One is the newline escape (backslash) for a long
dictionary definition. The other is an embedded \n in the output.
I used the +NORMALIZE_WHITESPACE directive. I
On 11/27/2012 04:50 AM, Albert-Jan Roskam wrote:
On 27/11/12 08:06, Albert-Jan Roskam wrote:
(Steven D'Aprano wrote, even though the indentation is wrong)
Doctesting anything to do with dictionaries is tricky, because you
cannot rely on the order of a dict. There are a couple of
On 27/11/12 20:50, Albert-Jan Roskam wrote:
Function name _setMultRespDefsEx is not self-explanatory, or even
*hint* at what the function is supposed to do. It appears to take a
dictionary of stuff, and formats it as a string. It would be nice[1]
if your docstring explained what sort of stuff.
Hi,
I am using doctest and I am struggling with newlines characters (see below).
One is the newline escape (backslash)
for a long dictionary definition. The other is an embedded \n in the output. I
used the +NORMALIZE_WHITESPACE
directive. I also tried using a triple-quoted raw docstring. Any
On 27/11/12 08:06, Albert-Jan Roskam wrote:
Hi,
I am using doctest and I am struggling with newlines characters
(see below). One is the newline escape (backslash) for a long
dictionary definition. The other is an embedded \n in the output.
I used the +NORMALIZE_WHITESPACE directive. I also
On 27/11/12 09:02, Steven D'Aprano wrote:
Here's my attempt:
def _setMultRespDefsEx(multRespDefs):
Format a dictionary of stuff as a string. Expects that dict contains:
[...]
KNOWN BUGS:
1) Sometimes this function returns a dict instead of a string.
2) The formatted string output is
Hi all,
When i run a doctest on this piece of code (shown at bottom) i get this error
message [from the doctest]:
Trying:
rot13('5 The Parade')
Expecting:
'5 Gur Cnenqr'
**
File F:\Uni\Rot13_1.py, line 12, in
On 11/18/2011 10:29 AM, John wrote:
Hi all,
When i run a doctest on this piece of code (shown at bottom) i get
this error message [from the doctest]:
Trying:
rot13('5 The Parade')
Expecting:
'5 Gur Cnenqr'
**
File
Date: Thu, 17 Nov 2011 22:49:33 -0500
From: d...@davea.name
To: nidia...@hotmail.com
CC: tutor@python.org
Subject: Re: [Tutor] Doctest error!
On 11/18/2011 10:29 AM, John wrote:
Hi all,
When i run a doctest on this piece of code (shown
On 11/17/2011 10:56 PM, Nidian Job-Smith wrote:
Date: Thu, 17 Nov 2011 22:49:33 -0500
From: d...@davea.name
To: nidia...@hotmail.com
CC: tutor@python.org
Subject: Re: [Tutor] Doctest error!
On 11/18/2011 10:29 AM, John wrote:
Hi all,
When i run
Don Taylor wrote:
Hi:
I am trying to use Doctest and am having trouble using the ellipsis
feature when trying to match an object reference.
What version of Python are you using? The ELLIPSIS comment was added in
Python 2.4.
Kent
Here is the code:
def add_change_listener(self,
Kent Johnson wrote:
Don Taylor wrote:
Hi:
I am trying to use Doctest and am having trouble using the ellipsis
feature when trying to match an object reference.
What version of Python are you using? The ELLIPSIS comment was added in
Python 2.4.
I am using 2.4.2
Don.
[Don Taylor]
I am trying to use Doctest and am having trouble using the ellipsis
feature when trying to match an object reference.
Here is the code:
def add_change_listener(self, listener):
'''
Returns list of listeners just for testing.
def
Tim Peters wrote:
That should work, provided there aren't differences in whitespace
that are invisible to us in this medium. For example, if, in your
source file, there's actually a (one or more) trailing space on your
line of expected output, then it would _not_ match the actual output.
[Tim Peters]
That should work, provided there aren't differences in whitespace
that are invisible to us in this medium. For example, if, in your
source file, there's actually a (one or more) trailing space on your
line of expected output, then it would _not_ match the actual output.
Try
Jacob S. wrote:
Even so, doctest doesn't seem to recognize the module level docstring.
It will run the test inside the functions, but it says there isn't a test on
the module level.
I put the docstring just like in the example at the link you provided...
Please post the code for the module you are
Alan Gauld wrote:
Also, anything I can do... Presently, since I'm running windows xp,
I would
have to hunt for the command prompt and type in the command
Start-Run
Type cmd,
Hit OK
:-)
Or drag the icon from accessories into the start menu or to
the desktop.
Or drag the icon to the left side of
Also, anything I can do... Presently, since I'm running windows xp, I
would have to hunt for the command prompt and type in the command
Click Start, click Run, type CMD, press Enter.
Voila! :)
Patric
'C:\python24\python.exe C:\documents and
settings\jacob\desktop\working python
19 matches
Mail list logo