mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-08-09 07:44:56 +02:00
Fix/pep8 (#277)
* re-organized imports according to pep8 * fixed all remaining pep8 issues * moved common config into setup.cfg, additionally test `tests` * removed --select=X -- the errors selected where by default not in flake8's --ignore list so effectively had no effect * update .travis.yml to reflect changes in tox.ini * make travis just use tox in order to avoid code duplaction * replace py.test with pytest * fixed .travis.yml * try different pypy toxenv * hopefully fixed testenv for pypy * added pypy basepython, removed unused python2.6 * install dev package before testing (fixes missing coverage) * fixed empty exception pass blocks with noqa * Added dummy log message on empty try-except-pass blocks to make dodacy happy :( * Replaced Exception with BaseException
This commit is contained in:
committed by
Brian May
parent
752a953101
commit
3bfb975ed9
@ -1,8 +1,10 @@
|
||||
import io
|
||||
import socket
|
||||
import sshuttle.server
|
||||
|
||||
from mock import patch, Mock
|
||||
|
||||
import sshuttle.server
|
||||
|
||||
|
||||
def test__ipmatch():
|
||||
assert sshuttle.server._ipmatch("1.2.3.4") is not None
|
||||
@ -45,7 +47,7 @@ Destination Gateway Genmask Flags MSS Window irtt Iface
|
||||
def test_listroutes_iproute(mock_popen, mock_which):
|
||||
mock_pobj = Mock()
|
||||
mock_pobj.stdout = io.BytesIO(b"""
|
||||
default via 192.168.1.1 dev wlan0 proto static
|
||||
default via 192.168.1.1 dev wlan0 proto static
|
||||
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.1
|
||||
""")
|
||||
mock_pobj.wait.return_value = 0
|
||||
|
Reference in New Issue
Block a user