|
by: Pierre Rouleau |
last post by:
I have a problem writing self-testable modules using doctest when these
modules have internationalized strings using gettext _('...').
- The main module of an application (say app.py) calls gettext.install()
to install the special _ function inside Python builtin. Other modules,
taken from a general purpose collection of Python modules, also support
internationalisation and doctest testing.
For example:
|
by: Alan G Isaac |
last post by:
> python doctest.py -v
Running doctest.__doc__
Trying: .remove(42)
Expecting:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ValueError: list.remove(x): x not in list
ok
Trying: x = 12
Expecting: nothing
|
by: Michele Simionato |
last post by:
Some time ago I hacked a custom solution to run doctests
on text files containing documentation. The solution
involved this kind of game:
tester=doctest.Tester(globs={},verbose=1)
tester.runstring(mytest)
It worked fine, but now with Python 2.4.a3 I get
DeprecationWarning: class Tester is deprecated; use class
|
by: Michele Simionato |
last post by:
I am getting a strange error with this script:
$ cat doctest-threads.py
"""
>>> import time, threading
>>> def example():
.... thread.out =
.... while thread.running:
.... time.sleep(.01)
.... thread.out.append(".")
|
by: John J Lee |
last post by:
Is it possible to get doctest-mode to work with mmm-mode and python-mode
nicely so that docstrings containing doctests are editable in
doctest-mode?
In my utter e-lisp ignorance, I tried this:
(require 'mmm-auto)
(setq mmm-global-mode 'maybe)
(mmm-add-classes
'(
|
|
by: p.lavarre |
last post by:
From: http://docs.python.org/lib/doctest-soapbox.html ...
Can I somehow tell doctest that it's time to quit?
I ask because not all doctest examples are created equal. Some
failures are catastrophic, making all subsequent failures at least
uninteresting, and maybe painfully slow. Other failures are
negligible, making the print of any subsequent failure valuable.
So sys.exit() doesn't do what I mean: it raises SystemExit, but doctest
|
by: Eric Mahurin |
last post by:
Noob here. Just got into python a little over a week ago...
One of the (unique?) things I really like about python is the concept
of doctesting. But, now I want more! Here's what I'd like to see:
* easy debugging. As soon as there is a failure (unexpected exception
or mismatch), drop down into the debugger in a way to isolates the bug
down to the nearest test/example as much as possible.
* integrated with code coverage. I'd like...
|
by: thomas.guest |
last post by:
I'm not making progress with the following and would appreciate any
help.
Here's an interpreted Python session.
....
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'f' is not defined
|
by: Bzyczek |
last post by:
Hello,
I have problems with running doctests if I use czech national
characters in UTF-8 encoding.
I have Python script, which begin with encoding definition:
# -*- coding: utf-8 -*-
I have this function with doctest:
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|