Ezio Melotti added the comment:

> 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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15939>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to