| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Many of these utilities (or their ancestors) were developed originally by Zooko Wilcox-O'Hearn for the Mojo Nation, Mnet, Allmydata.com "Mountain View", Tahoe-LAFS, or SimpleGeo's products. Currently only Python 3 is supported.
Please note that version 2.X is based on Python 2. Both Python 2 and 3 are supported until version 3.3.6.
I don't currently use these, but I still think they are possibly good ideas.
I no longer use these and I don't recommend that you do either.
Thanks to Peter Westlake and Ravi Pinjala for help documenting what these do.
https://pypi.python.org/pypi/pyutil
https://github.com/tpltnt/pyutil
https://github.com/tpltnt/pyutil/issues
Testing requires pytest, twisted, and simplejson. Install them by running pip install pytest twisted simplejson. To run tests: pytest.
Testing requires these dependencies: twisted, setuptools_trial, and simplejson. You can install them by running: pip install twisted setuptools_trial simplejson.
To run tests: python ./setup.py trial -s pyutil.test.current.
You can also run the tests with the standard pyunit test runner instead of trial, but a couple of the tests will fail due to the absence of Trial's "Skip This Test" feature. You can also run the tests of the out-of-shape and deprecated modules:
python ./setup.py trial -s pyutil.test.out_of_shape
python ./setup.py trial -s pyutil.test.deprecated
Or of all modules:
python ./setup.py trial -s pyutil.test
Some modules have self-benchmarks provided. For example, to benchmark the cache module: python -OOu -c 'from pyutil.test import test_cache; test_cache.quick_bench()'
or for more complete and time-consuming results: python -OOu -c 'from pyutil.test import test_cache; test_cache.slow_bench()'
(The "-O" is important when benchmarking, since cache has extensive self-tests that are optimized out when -O is included.)
You can install all testing tools and test-time dependencies in a local virtualenv which avoids interference with user- or system-wide python packages. Here's an example of this process (command output omitted):
$ git clone 'https://github.com/tpltnt/pyutil'
$ cd pyutil/
$ virtualenv ./venv
$ ./venv/bin/pip install twisted setuptools_trial simplejson
$ ./venv/bin/python ./setup.py trial -s pyutil.testYou may use this package under the GNU General Public License, version 2 or, at your option, any later version. You may use this package under the Transitive Grace Period Public Licence, version 1.0, or at your option, any later version. (You may choose to use this package under the terms of either licence, at your option.) You may use this package under the Simple Permissive Licence, version 1 or, at your option, any later version. See the file COPYING.GPL for the terms of the GNU General Public License, version 2. See the file COPYING.TGPPL.rst for the terms of the Transitive Grace Period Public Licence, version 1.0. See the file COPYING.SPL.txt for the terms of the Simple Permissive Licence, version 1.
| Back | FazBrowse Home | New Git URL |