[qmtest] running qmtest on bash in cygwin...
Mark Mitchell
mark at codesourcery.com
Tue Aug 26 03:10:40 UTC 2003
Stefan --
Thanks for working on this! This is a very good idea, and I appreciate you
working it through.
> class qm_install_data(install_data.install_data):
> """override install_data to generate a 'config' module
> containing the path to the data dir (and possibly more)"""
Please use complete sentences (staring with a capital letter and ending with
a period) in documentation. This applies here and elsewhere. (I am
notoriously picky about this kind of thing, so I apologize in advance.)
> classes=['classes.qmc',
Is there a way to do this in an automated fashion? I hate the idea of
having to remember to update this list every time we add a new test class.
How about just finding all the ".py" files in the "classes/" directory?
> +try:
> + # this file was generated during the build
It's helpful to be a bit more specific in comments; something like:
# The config file is created during "make install" by setup.py.
?
> + from qm.config import config, version
> + version_info = tuple(string.split(version, '.'))
> + """The version of QM as a tuple of (major, minor, release)."""
Put single quotes around the tuple, i.e.:
"""The version of QM as a tuple '(major, minor, release)'."""
That makes it look right in HappyDoc.
> + # for now insert dummy values here so qmtest can still be
> + # built and installed the old way. To be removed eventually...
We avoid "for now" or "FIXME" comments because they tend to live on longer
than we'd like, and users see them and get worried. So, I'd just say:
# If qm.config was not available, we are running out of the source tree.
> + #print 'insert a meaningful error message here explaining'
> + #print 'the user not to run qmtest from the source tree'
> + #import sys
> + #sys.exit(-1)
Remove this stuff.
> # Search the builtin directory, too.
> + # the old way...
> dirs.append(os.path.join(os.path.dirname(__file__), "classes"))
> + # ...and the new one
> + dirs.append(os.path.join(qm.config.data_dir, 'test', 'classes'))
Those comments are confusing, if you don't have the whole source tree
swapped into your brain.
# When running from the source tree, we look for path relative to this
file.
... dirname(__file__)...
# In an installed version of QMTest, the config object tells us where to
look.
... qm.config.data_dir ...
And do we actually need to do this given that the config object generated
when running from the source tree sets data_dir itself?
Would you send me an SSH key so that we can get CVS write access set up for
you?
Thanks,
-- Mark
More information about the qmtest
mailing list