Erik Trauschke wrote:
> This is a quick fix for 7194691 which might save people, who don't know
> about the unwritten rule of running the test suite under locale C, some
> time.
So the idea of printing a warning is fine for the kind of problem that
7194691 is talking about, where a date string is printed in a different
format, changing the output of a command, and causing a test to fail. I
don't think that's a problem that calls for skipping the test. Creating a
mechanism that causes a test to be run in a specific locale would be nice,
but not, I think, necessary here.
But locale control is more finely-grained than just LC_ALL and LANG. The
specific date string problem in 7194691 is controlled by LC_TIME as well,
and in another message in this thread, you talk about a message that's
translated when it shouldn't be (for the purposes of the test), which is
controlled by LC_MESSAGES. And I frequently see people get screwed up by
LC_COLLATE. I doubt LC_MONETARY or LC_NUMERIC would be problems, though.
So your test should probably be a bit more comprehensive. And they can
probably be combined into one if statement:
if os.environ.get("LC_ALL", "C") != "C" or \
os.environ.get("LC_TIME", "C") != "C" or ...
Danek
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss