# -*- tab-width: 4 -*- # Copyright (c) 2009 Tim Freeman # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. # # (This is the standard MIT License, copied from # http://www.opensource.org/licenses/mit-license.php on 24 Apr 2007.) #desc Script for generating index.html. from sys import argv from os import stat from glob import glob import htmlgen canonical_url = htmlgen.code_url + "/index.html" canonical_zip = htmlgen.code_url + "/respect_code.zip" admin_files = [x for x in argv[1:] if x.endswith(".py")] unit_tests = [x for x in glob("*_test.py") if x not in admin_files] source_files = [x for x in glob("*.py") if x not in admin_files + unit_tests] def entry(x): if type(x) == int or type(x) == long: align = "right" else: align = "left" return "
| Name | Bytes | Lines | " + "Description |
|---|
This file describes how to """+d.nameref("run", "run the regression tests")+\ """, and it provides an overview that makes it easy to """+d.nameref("individual-source","browse individual source files")+""" either from the web or after downloading the sources. """+d.h2("run","Running Tests")+""" The code was tested on a 600 MhZ Pentium system running GNU/Linux. It is written in Python, and tested against Python 2.3.5. Using GNU/Linux for testing ought to be inessential, but you will need Python, which can be downloaded from """+d.urlref("http://www.python.org")+""". To run the tests, do the following:
import mpmath mpmath.__version__
python regress.py -nocover to run the
regression tests without doing coverage analysis. This takes 23
seconds on a 600 MhZ Pentium system.
python regress.py to run the regression tests
and print the results from coverage analysis. This will take about 10
times as long as running without coverage analysis.
If you have problems with this, or you have observed it to work with a different version of Python or a different operating system, send me email at """+d.my_email()+""". """+d.h2("individual-source", "Individual Source Files")+""" We have three categories of Python source here:
foo_test.py is almost always
a test for foo.py.
"""+list_files(d, unit_tests) \
+ d.h3("admin", "Administrative Files") \
+ list_files(d, admin_files) \
+ d.h2("other", "Other Files") + """
If you want to regenerate this document from source, or you want to
repackage a variation on the source code, read the
Makefile.
coverage.py.patch includes some workarounds for Python
variable naming bugs that the coverage analyzer aggravates. These
bugs exist in Python 2.3.5 and may not exist in newer versions.
""" + d.end()
print documentGenerator(htmlgen.RealDocument(sourceDirectory=".", sourceURL=""))