Byron/smmap — pull request #5 by msabramo (2012-07-11 02:52:36+00:00)
Title: Add support for tox (http://tox.testrun.org/) and Travis CI (http://travis-ci.org/)

Sample Travis CI build for my fork: http://travis-ci.org/#!/msabramo/smmap/builds/1832566

To add support for Travis CI to your own GitHub repo, follow the instructions at http://about.travis-ci.org/docs/user/getting-started/ and then accept this pull request.

Sample tox output:

```
~/dev/git-repos/smmap$ tox
GLOB sdist-make: /Users/marca/dev/git-repos/smmap/setup.py
py24 sdist-reinst: /Users/marca/dev/git-repos/smmap/.tox/dist/smmap-0.8.2.zip
py24 runtests: commands[0]
optimal: Made 100 random single byte accesses to buffer created from reading a total of 0.000100 mb in 0.002758 s (0.036258 mb/s)
optimal: Made 100 random slice accesses to buffer created from reading a total of 188.523549 mb in 0.552254 s (341.371112 mb/s)
worst case: Made 100 random single byte accesses to buffer created from reading a total of 0.000100 mb in 0.044212 s (0.002262 mb/s)
worst case: Made 100 random slice accesses to buffer created from reading a total of 216.164613 mb in 2.304345 s (93.807404 mb/s)
static optimial: Made 100 random single byte accesses to buffer created from reading a total of 0.000100 mb in 0.002318 s (0.043142 mb/s)
static optimial: Made 100 random slice accesses to buffer created from reading a total of 188.005229 mb in 0.525478 s (357.779364 mb/s)
optimal: Made 100 random single byte accesses to buffer created from reading a total of 0.000100 mb in 0.002666 s (0.037509 mb/s)
optimal: Made 100 random slice accesses to buffer created from reading a total of 178.838513 mb in 0.509163 s (351.240265 mb/s)
worst case: Made 100 random single byte accesses to buffer created from reading a total of 0.000100 mb in 0.044599 s (0.002242 mb/s)
worst case: Made 100 random slice accesses to buffer created from reading a total of 219.261243 mb in 2.243817 s (97.717977 mb/s)
static optimial: Made 100 random single byte accesses to buffer created from reading a total of 0.000100 mb in 0.002404 s (0.041598 mb/s)
static optimial: Made 100 random slice accesses to buffer created from reading a total of 162.001507 mb in 0.484744 s (334.200079 mb/s)
..: Read 114 mb of memory with 5000 random on cursor initialized with accesses in 0.383279s (299.749635 mb/s)
: Read 81 mb of memory with 5000 random on cursor initialized with accesses in 0.266209s (305.630236 mb/s)
: Read 191 mb of memory with 5000 random on cursor initialized with accesses in 2.591082s (73.864918 mb/s)
: Read 191 mb of memory with 5000 random on cursor initialized with accesses in 2.478720s (77.109698 mb/s)
.......
----------------------------------------------------------------------
Ran 9 tests in 14.160s

OK
py25 sdist-reinst: /Users/marca/dev/git-repos/smmap/.tox/dist/smmap-0.8.2.zip
py25 runtests: commands[0]
optimal: Made 100 random single byte accesses to buffer created from reading a total of 0.000100 mb in 0.002631 s (0.038009 mb/s)
optimal: Made 100 random slice accesses to buffer created from reading a total of 186.266697 mb in 0.516216 s (360.830898 mb/s)
worst case: Made 100 random single byte accesses to buffer created from reading a total of 0.000100 mb in 0.046692 s (0.002142 mb/s)
worst case: Made 100 random slice accesses to buffer created from reading a total of 191.654412 mb in 2.051402 s (93.426069 mb/s)
static optimial: Made 100 random single byte accesses to buffer created from reading a total of 0.000100 mb in 0.002524 s (0.039621 mb/s)
static optimial: Made 100 random slice accesses to buffer created from reading a total of 189.582196 mb in 0.574255 s (330.135914 mb/s)
optimal: Made 100 random single byte accesses to buffer created from reading a total of 0.000100 mb in 0.002420 s (0.041323 mb/s)
optimal: Made 100 random slice accesses to buffer created from reading a total of 189.596235 mb in 0.527839 s (359.193180 mb/s)
worst case: Made 100 random single byte accesses to buffer created from reading a total of 0.000100 mb in 0.042692 s (0.002342 mb/s)
worst case: Made 100 random slice accesses to buffer created from reading a total of 164.604933 mb in 1.666680 s (98.762164 mb/s)
static optimial: Made 100 random single byte accesses to buffer created from reading a total of 0.000100 mb in 0.002586 s (0.038668 mb/s)
static optimial: Made 100 random slice accesses to buffer created from reading a total of 177.215372 mb in 0.495040 s (357.981968 mb/s)
..: Read 57 mb of memory with 5000 random on cursor initialized with accesses in 0.271982s (212.154524 mb/s)
: Read 52 mb of memory with 5000 random on cursor initialized with accesses in 0.218363s (239.265759 mb/s)
: Read 191 mb of memory with 5000 random on cursor initialized with accesses in 2.655780s (72.174308 mb/s)
: Read 191 mb of memory with 5000 random on cursor initialized with accesses in 2.496401s (76.739384 mb/s)
.......
----------------------------------------------------------------------
Ran 9 tests in 13.308s

OK
py26 sdist-reinst: /Users/marca/dev/git-repos/smmap/.tox/dist/smmap-0.8.2.zip
py26 runtests: commands[0]
optimal: Made 100 random single byte accesses to buffer created from reading a total of 0.000100 mb in 0.002546 s (0.039276 mb/s)
optimal: Made 100 random slice accesses to buffer created from reading a total of 198.865623 mb in 0.249460 s (797.184468 mb/s)
worst case: Made 100 random single byte accesses to buffer created from reading a total of 0.000100 mb in 0.011850 s (0.008439 mb/s)
worst case: Made 100 random slice accesses to buffer created from reading a total of 162.931487 mb in 0.726687 s (224.211383 mb/s)
static optimial: Made 100 random single byte accesses to buffer created from reading a total of 0.000100 mb in 0.002495 s (0.040079 mb/s)
static optimial: Made 100 random slice accesses to buffer created from reading a total of 175.930506 mb in 0.221395 s (794.645288 mb/s)
optimal: Made 100 random single byte accesses to buffer created from reading a total of 0.000100 mb in 0.002347 s (0.042608 mb/s)
optimal: Made 100 random slice accesses to buffer created from reading a total of 201.493226 mb in 0.259335 s (776.961051 mb/s)
worst case: Made 100 random single byte accesses to buffer created from reading a total of 0.000100 mb in 0.009908 s (0.010093 mb/s)
worst case: Made 100 random slice accesses to buffer created from reading a total of 243.259049 mb in 0.985697 s (246.788862 mb/s)
static optimial: Made 100 random single byte accesses to buffer created from reading a total of 0.000100 mb in 0.002489 s (0.040179 mb/s)
static optimial: Made 100 random slice accesses to buffer created from reading a total of 210.673156 mb in 0.283154 s (744.023210 mb/s)
..: Read 45 mb of memory with 5000 random on cursor initialized with accesses in 0.126878s (356.238061 mb/s)
: Read 44 mb of memory with 5000 random on cursor initialized with accesses in 0.141703s (315.455102 mb/s)
: Read 191 mb of memory with 5000 random on cursor initialized with accesses in 0.816805s (234.777387 mb/s)
: Read 191 mb of memory with 5000 random on cursor initialized with accesses in 0.684965s (279.083847 mb/s)
.......
----------------------------------------------------------------------
Ran 9 tests in 6.280s

OK
py27 sdist-reinst: /Users/marca/dev/git-repos/smmap/.tox/dist/smmap-0.8.2.zip
py27 runtests: commands[0]
optimal: Made 100 random single byte accesses to buffer created from reading a total of 0.000100 mb in 0.001774 s (0.056367 mb/s)
optimal: Made 100 random slice accesses to buffer created from reading a total of 163.420479 mb in 0.214181 s (763.001947 mb/s)
worst case: Made 100 random single byte accesses to buffer created from reading a total of 0.000100 mb in 0.011838 s (0.008447 mb/s)
worst case: Made 100 random slice accesses to buffer created from reading a total of 209.553144 mb in 1.082414 s (193.597977 mb/s)
static optimial: Made 100 random single byte accesses to buffer created from reading a total of 0.000100 mb in 0.001955 s (0.051150 mb/s)
static optimial: Made 100 random slice accesses to buffer created from reading a total of 229.968898 mb in 0.310363 s (740.967945 mb/s)
optimal: Made 100 random single byte accesses to buffer created from reading a total of 0.000100 mb in 0.002031 s (0.049240 mb/s)
optimal: Made 100 random slice accesses to buffer created from reading a total of 191.918017 mb in 0.246272 s (779.292608 mb/s)
worst case: Made 100 random single byte accesses to buffer created from reading a total of 0.000100 mb in 0.009081 s (0.011012 mb/s)
worst case: Made 100 random slice accesses to buffer created from reading a total of 176.491345 mb in 1.943494 s (90.811362 mb/s)
static optimial: Made 100 random single byte accesses to buffer created from reading a total of 0.000100 mb in 0.001637 s (0.061088 mb/s)
static optimial: Made 100 random slice accesses to buffer created from reading a total of 182.277763 mb in 0.205773 s (885.820162 mb/s)
..: Read 80 mb of memory with 5000 random on cursor initialized with accesses in 0.157342s (513.384710 mb/s)
: Read 59 mb of memory with 5000 random on cursor initialized with accesses in 0.138894s (425.403290 mb/s)
: Read 191 mb of memory with 5000 random on cursor initialized with accesses in 0.734113s (260.892059 mb/s)
: Read 192 mb of memory with 5000 random on cursor initialized with accesses in 0.645190s (297.615392 mb/s)
.......
----------------------------------------------------------------------
Ran 9 tests in 8.257s

OK
_________________________________________________________________________ summary __________________________________________________________________________
py24: commands succeeded
py25: commands succeeded
py26: commands succeeded
py27: commands succeeded
congratulations :)
```