Skip to content

Commit

Permalink
fix test import err
Browse files Browse the repository at this point in the history
  • Loading branch information
revol.cai committed Mar 3, 2018
1 parent f0d5c43 commit 51baee5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ python:
- 2.7

# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
install: pip install -U tox-travis
install: pip install --use-mirrors -U tox-travis

# command to run tests, e.g. python setup.py test
script: tox
Expand Down
6 changes: 4 additions & 2 deletions tests/etcd_go_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,17 @@ def etcdctl(*args, **kwargs):
cmd.extend(args)
p = Popen(cmd, stdout=PIPE, env=envs)
out, err = p.communicate()
if not p.returncode == 0:
if p.returncode != 0:
raise RuntimeError(err)
return out


NO_ETCD_SERVICE = True
try:
if ETCDCTL_PATH and etcdctl('--dial-timeout=0.2s endpoint health'):
NO_ETCD_SERVICE = False
except:
NO_ETCD_SERVICE = True
pass

if __name__ == '__main__':
print(etcdctl('get foo'))
1 change: 0 additions & 1 deletion tests/test_client.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest
import six

from etcd3.client import Etcd3APIClient
from etcd3.errors import Etcd3APIError
Expand Down

0 comments on commit 51baee5

Please sign in to comment.