[pygr-notify] Issue 69 in pygr: Make megatests more portable
codesite-noreply at google.com
codesite-noreply at google.com
Mon Mar 30 21:13:47 PDT 2009
Updates:
Labels: -reviewby-deepreds reviewby-the.good.doctor.is.in
Comment #12 on issue 69 by marecki: Make megatests more portable
http://code.google.com/p/pygr/issues/detail?id=69
Right, since it was Namshin who posted the last patch I guess I am the
reviewer now.
1. ConfigParser fix:
Namshin is right about using os.path.join(), os.path.expanduser() doesn't
automatically convert path separators - which is funny, because I nicked
that
particular bit of code from official Python documentation :-) (see the code
example
for RawConfigParser.read() at
http://docs.python.org/library/configparser.html).
However:
- as one can see at http://docs.python.org/library/os.path.html ,
os.path.expanduser
() is recommended for determining home-directory path because it can handle
cases
other than querying $HOME;
- adding an exception handler for non-existent $HOME variable, while
necessary when
reading os.environ, is a bit redundant here because it means having two
separate
calls to ConfigParser.read() - which is not necessary with
os.path.expanduser() even
if the home directory cannot be determined for some reason
(ConfigParser.read()
quietly skips over bad paths).
Attached you will find a modified version of Namshin's patch, nominating it
for
inclusion as soon as somone (i.e. Titus or Chris, since both Namshin and I
are now
not objective code-wise) signs it off.
2. Running-time check
A very useful addition, except it has nothing to do with portability of
megatests :-)
I'm about to create a new issue for it, with Namshin as owner and me as
reviewer.
Attachments:
0001-Results-of-Namshin-s-review-of-megatest-portability.patch 5.5 KB
0002-Guess-what-forgotten-to-pass-b-to-runtest.py-AGAIN.patch 841 bytes
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
More information about the pygr-notify
mailing list