tests that depend on filling up an OS pipe so that they work properly
on systems configured with large pipe buffers.
Also a subprocess docstring update that i forgot was in my client when
i did the original 3.3 commit... easier to just leave that in here
with this one than go back and undo/redo.
The concept of what was unexpected was typically defined as "some
depencendy wasn't installed", which isn't unexpected at all as it's
totally optional. Since it confuses new contributors as they think
something is wrong with their installation it seems sensible to get
rid of the concept.
This change also adds the concept of optional tests that are required
to work on a specific platform(s) (e.g. test_winreg on Windows). This
should help catch compile issues instead of a test being blindly
skipped even when it should have run.
The skipped test list in the future can also print out the reason for
being skipped to make it more obvious as to why the skipping occurred.
Check if data is decoded by os.fsdecode() (filesystem encoding with
surrogateescape error handler, PEP 383), not by UTF-8 or the filesystem
encoding in strict mode.
Use TESTFN_UNDECODABLE in test_cmd_line_script.test_non_ascii() on UNIX.
* support.TESTFN_UNDECODABLE was decodable if the filesystem encoding was
cp932
* test_genericpath.test_nonascii_abspath() didn't work on Windows if the
path was not decodable (ex: with cp932)
Pass the original filename argument to OSError constructor, instead of trying
to encode it to or decode it from the filesystem encoding. This change avoids
an additionnal UnicodeDecodeError on Windows if the filename cannot be decoded
from the filesystem encoding (ANSI code page).
Many functions now support "dir_fd" and "follow_symlinks" parameters;
some also support accepting an open file descriptor in place of of a path
string. Added os.support_* collections as LBYL helpers. Removed many
functions only previously seen in 3.3 alpha releases (often starting with
"f" or "l", or ending with "at"). Originally suggested by Serhiy Storchaka;
implemented by Larry Hastings.
There is a rare edge case where the filesystem used by the tempfile functions
(usually /tmp) doesn't support xattrs while the one used by TESTFN (the current
directory, so likely to be below /home) does. This causes the xattr related
test_shutil tests fail. skip_unless_xattr now checks both.
I have also added skip_unless_xattr to __all__ where it has been missing.