[Python-Dev] test_pep277 vs Win98 (original) (raw)
Tim Peters tim.one@comcast.net
Fri, 04 Oct 2002 23:09:01 -0400
- Previous message: [Python-Dev] test_pep277 vs Win98
- Next message: [Python-Dev] test_pep277 vs Win98
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Mark Hammond]
OK - in the efforts of actually progressing something , would you prefer a patch that:
* Added os.getwindowsversion() as an alias for the Win32 GetVersion() function. We then clone the test in posixmodule.c for testpep277.py, and life is good. This function would be generally useful - it is almost a FAQ on c.l.python and all the answers are generally unsatisfactory.
I agree that would be (very) useful to have, but also agree with your unstated but fiercly held belief that it's a hacky solution to the immediate problem at hand .
* Added os.unicodefileapis(), which exposes the internal posixmodule function unicodefilenames(). Currently this is simply a GetVersion() call, but later it may grow additional checks.
This sounds more direct, but loses me. Presumably the test is testing something that could be a given an informative name. Think like a Tim here: what does this test do? Then why is it that Windows NT+ are the only OSes on Earth where it's possible to do that thing? Or are the only OSes on Earth where it's necessary to do that thing? A Tim-friendly one-word answer to that question would give a nice name for a new boolean attribute to test:
if not os.supports_FRIENDLY_NAME: rase TestSkipped, "test requires os.supports_FRIENDLY_NAME"
I don't know what FRIENDLY_NAME should be, but "_unicode_file_apis()" doesn't seem likely to be it.
- Previous message: [Python-Dev] test_pep277 vs Win98
- Next message: [Python-Dev] test_pep277 vs Win98
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]