This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ezio.melotti
Recipients chris.jerdonek, docs@python, ezio.melotti
Date 2012-10-11.17:56:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1349978186.97.0.324345966472.issue15939@psf.upfronthosting.co.za>
In-reply-to
Content
> A way to do it could be to register new doctest directives that skip
> the marked test based on the value of sys.platform.

That can be done for 3.4+ only though.

> If we remove the directives, we lose that information and won't
> be able to do it anymore.

It actually seems quite easy to distinguish them.  At the beginning 'libc' is created either using cdll.msvcrt (on windows) or CDLL("libc.so.6") (on Linux).  There are examples that use windll and other Windows- or Linux-specific functions later on but it's usually quite evident.  If we get lost we can always dig in the history or just run the tests and see where they fail.

FTR there were a few actual errors that I fixed (mostly about bytes vs string).  I also removed unnecessary prints and added a few doctest directives to make some of the tests pass.  'from ctypes import *' is used quite frequently, and it would be better to change it, but I left it unchanged for now.  I also removed an obsolete warning about the doctest directives in the example because Sphinx hides them.
History
Date User Action Args
2012-10-11 17:56:27ezio.melottisetrecipients: + ezio.melotti, chris.jerdonek, docs@python
2012-10-11 17:56:26ezio.melottisetmessageid: <1349978186.97.0.324345966472.issue15939@psf.upfronthosting.co.za>
2012-10-11 17:56:26ezio.melottilinkissue15939 messages
2012-10-11 17:56:26ezio.melotticreate