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 d01aca9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
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 d01aca9

Please sign in to comment.