Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5aa515e52c | ||
|
|
a75ee8e097 | ||
|
|
7e4f319ad4 | ||
|
|
18e5a38d32 | ||
|
|
5f6267a489 | ||
|
|
14e3a390bc | ||
|
|
bb9214fd0d |
@ -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
22
tests/scripts/source.py
Normal 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()
|
||||
)
|
||||
6
tox.ini
6
tox.ini
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user