Compare commits

...

30 Commits

Author SHA1 Message Date
Matt Martz cbdbab3d16 Print share results, when --share is specified 2014-04-30 09:10:03 -05:00
Matt Martz 3695acb020 Fix descriptors 2014-04-30 09:09:37 -05:00
Matt Martz f689af0fc6 While we don't have to worry about python caching results since we aren't a browser, some proxies cause inconsistent results as they are caching requests 2014-04-30 08:46:36 -05:00
Matt Martz 44bc5d2bef Additionally, don't run callback if the shutdown_event is set 2014-04-29 19:21:55 -05:00
Matt Martz 557e662a6c Don't run callback if a callback is not set 2014-04-28 14:11:47 -05:00
Matt Martz 395553f089 s/args\.mini/url/ 2014-04-17 16:34:13 -05:00
Matt Martz 16b8aec1d7 Better testing using tox 2014-04-17 16:21:25 -05:00
Matt Martz 93e13b528f When using --mini and no extension is found, try all of the standard upload extensions. 2014-04-17 16:20:02 -05:00
Matt Martz 5cba294b76 Some fixes for python2.4 2014-04-17 10:16:39 -05:00
Matt Martz dfeb19ff68 Speed and memory improvement for populating StringIO 2014-04-12 22:58:57 -04:00
Matt Martz 6888a5aae1 Use socket logic to determine proper number of threads for upload 2014-03-10 12:19:08 -05:00
Matt Martz 0e7160e8e6 Fix python3 issues 2014-03-10 12:18:47 -05:00
Matt Martz 5ec8fa590d document FakeShutdownEvent 2014-03-10 11:41:07 -05:00
Matt Martz f009711526 docstring updates 2014-03-10 11:32:34 -05:00
Matt Martz de594188e5 Move exception classes higher in the file 2014-03-10 11:28:22 -05:00
Matt Martz 989c440700 Add ability to handle upload timeout threshold by using a stream for post data 2014-03-10 11:25:09 -05:00
Matt Martz d28c8f18b0 pep8 logic fix 2014-03-09 22:41:34 -05:00
Matt Martz 3c81acc96c Allow callback to print before and after download/upload, and prefix Uploader and Downloader with HTTP 2014-03-09 22:05:42 -05:00
Matt Martz 8f5faafada pep8 fix 2014-03-08 18:19:31 -06:00
Matt Martz 3ffb447210 s/tagName/tag_name/g 2014-03-08 18:10:42 -06:00
Matt Martz 1f16fb3cfe Use custom user agent 2014-03-08 18:10:22 -06:00
Matt Martz 71b456594f messages for upload/download reversed 2014-03-08 18:02:46 -06:00
Matt Martz feb7f6bff1 pep8 spacing fix 2014-03-06 11:57:35 -06:00
Matt Martz 79c3a19792 Add support for --csv and --json arguments as output types 2014-03-06 11:54:31 -06:00
Matt Martz 3b29d5701d cast server id to int to be more consistent with the rest of the data 2014-02-28 12:23:36 -06:00
Matt Martz 9ef5620b58 Don't require people to explicitly perform all steps, retrieve servers if not already retrieved, select closest if not already selected 2014-02-28 12:17:22 -06:00
Matt Martz b846f4dd88 Handle issues determining distance to test servers 2014-02-28 12:16:46 -06:00
Matt Martz bab7a9d88e Create a Fake shutdown event so that users of the API are not required to register a shutdown event 2014-02-28 12:16:27 -06:00
Matt Martz 88565d5acd Huge refactor, too many changes to really address individually 2014-02-27 16:38:19 -06:00
Matt Martz 42bbc21546 lowercase with underscores and move arg parsing into it's own function 2014-02-26 20:54:48 -06:00
3 changed files with 843 additions and 405 deletions

View File

@ -1,30 +1,35 @@
---
language: python language: python
python: python:
- 2.6
- 2.7 - 2.7
- 3.2
- 3.3 env:
- pypy - TOXENV=py24
- TOXENV=py25
- TOXENV=py26
- TOXENV=py27
- TOXENV=py31
- TOXENV=py32
- TOXENV=py33
- TOXENV=py34
- TOXENV=pypy
- TOXENV=flake8
before_install:
- if [[ $(echo "$TOXENV" | egrep -c "(py2[45]|py3[14])") != 0 ]]; then sudo add-apt-repository -y ppa:fkrull/deadsnakes; fi;
- if [[ $(echo "$TOXENV" | egrep -c "(py2[45]|py3[14])") != 0 ]]; then sudo apt-get update -qq; fi;
- if [[ "$TOXENV" == "py24" ]]; then sudo apt-get install -y python2.4; fi;
- if [[ "$TOXENV" == "py25" ]]; then sudo apt-get install -y python2.5; fi;
- if [[ "$TOXENV" == "py31" ]]; then sudo apt-get install -y python3.1; fi;
- if [[ "$TOXENV" == "py34" ]]; then sudo apt-get install -y python3.4; fi;
- if [[ "$TOXENV" == "pypy" ]]; then sudo apt-get install -y pypy; fi;
install: install:
- pip install . - if [[ $(echo "$TOXENV" | egrep -c "(py2[45]|py31)") != 0 ]]; then pip install virtualenv==1.7.2 tox==1.3; fi;
- pip install pep8 pyflakes - if [[ $(echo "$TOXENV" | egrep -c "(py2[45]|py31)") == 0 ]]; then pip install tox; fi;
script: script:
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pep8 --show-source speedtest_cli.py; fi - tox
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pyflakes speedtest_cli.py; fi
- python speedtest_cli.py
# - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then curl -s http://www.python.org/ftp/python/2.4.6/Python-2.4.6.tar.bz2 | tar xj; fi
# - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then cd Python-2.4.6; ./configure --prefix=$HOME/virtualenv/python2.4 > /dev/null 2>&1; fi
# - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then make > /dev/null 2>&1; fi
# - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then make install > /dev/null 2>&1; cd ..; fi
# - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then ~/virtualenv/python2.4/bin/python2.4 -V; fi
# - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then ~/virtualenv/python2.4/bin/python2.4 ./speedtest_cli.py; fi
notifications: notifications:
email: email:

File diff suppressed because it is too large Load Diff

19
tox.ini Normal file
View File

@ -0,0 +1,19 @@
[tox]
skipsdist=true
[testenv]
commands =
{envpython} -V
{envpython} speedtest_cli.py
[testenv:flake8]
basepython=python
deps=flake8
commands =
{envpython} -V
flake8 speedtest_cli.py
[testenv:pypy]
commands =
pypy -V
pypy speedtest_cli.py