Compare commits

...

7 Commits

Author SHA1 Message Date
Matt Martz 5aa515e52c foo 2018-01-02 17:07:28 -06:00
Matt Martz a75ee8e097 foo 2018-01-02 17:02:34 -06:00
Matt Martz 7e4f319ad4 foo 2018-01-02 16:48:38 -06:00
Matt Martz 18e5a38d32 foo 2018-01-02 16:41:54 -06:00
Matt Martz 5f6267a489 foo 2018-01-02 16:36:20 -06:00
Matt Martz 14e3a390bc foo 2018-01-02 16:30:20 -06:00
Matt Martz bb9214fd0d testy 2018-01-02 16:25:30 -06:00
3 changed files with 29 additions and 0 deletions

View File

@ -45,6 +45,7 @@ install:
- if [[ $(echo "$TOXENV" | egrep -c "(py2[45]|py3[12])") == 0 ]]; then pip install tox; fi;
script:
- ifconfig
- tox
notifications:

22
tests/scripts/source.py Normal file
View File

@ -0,0 +1,22 @@
#!/usr/bin/env python
import sys
import subprocess
cmd = [sys.executable, 'speedtest.py', '--source', '127.0.0.1']
p = subprocess.Popen(
cmd,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE
)
stdout, stderr = p.communicate()
if p.returncode != 1:
raise SystemExit('%s did not fail with exit code 1' % ' '.join(cmd))
if 'Invalid argument'.encode() not in stderr:
raise SystemExit(
'"Invalid argument" not found in stderr:\n%s' % stderr.decode()
)

View File

@ -2,10 +2,13 @@
skipsdist=true
[testenv]
whitelist_externals = bash
commands =
{envpython} -V
{envpython} -m compileall speedtest.py
{envpython} speedtest.py
{envpython} speedtest.py --source 172.17.0.1
{envpython} tests/scripts/source.py
[testenv:flake8]
basepython=python
@ -15,7 +18,10 @@ commands =
flake8 speedtest.py
[testenv:pypy]
whitelist_externals = bash
commands =
pypy -V
pypy -m compileall speedtest.py
pypy speedtest.py
pypy speedtest.py --source 172.17.0.1
pypy tests/scripts/source.py