Skip to content

Commit

Permalink
Updated setup.py, manifest. Updated paramiko requirement to accept ve… (
Browse files Browse the repository at this point in the history
#89)

Updated setup.py, manifest, tests. 
Updated paramiko requirement to accept version 2 but <2.2.
  • Loading branch information
pkittenis committed Aug 31, 2017
1 parent b53799d commit 52e7974
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ install:
script:
- nosetests --with-coverage --cover-package=pssh
- flake8 pssh
- cd doc; make html
- cd doc; make html; cd ..
before_deploy:
- cd $TRAVIS_BUILD_DIR
after_success:
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include versioneer.py
include pssh/_version.py
recursive-exclude tests *
2 changes: 0 additions & 2 deletions pssh/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

# This file is part of parallel-ssh.

# Copyright (C) 2014-2017 Panos Kittenis
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
paramiko>=1.15.3,<2
paramiko>=1.15.3,<2.2
gevent
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@
author='Panos Kittenis',
author_email='22e889d8@opayq.com',
url="https://github.com/ParallelSSH/parallel-ssh",
packages=find_packages('.', exclude=(
'embedded_server', 'embedded_server.*')),
install_requires=['paramiko<2', gevent_req],
packages=find_packages(
'.', exclude=('embedded_server', 'embedded_server.*',
'tests', 'tests.*',
'*.tests', '*.tests.*')
),
install_requires=['paramiko<2.2', gevent_req],
classifiers=[
'License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)',
'Intended Audience :: Developers',
Expand Down
Empty file added tests/__init__.py
Empty file.
10 changes: 6 additions & 4 deletions tests/test_pssh_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import sys
from socket import timeout as socket_timeout

import gevent
from gevent import sleep
from pssh import ParallelSSHClient, UnknownHostException, \
AuthenticationException, ConnectionErrorException, SSHException, \
logger as pssh_logger
Expand Down Expand Up @@ -249,7 +249,7 @@ def test_pssh_client_timeout(self):
output = client.run_command(self.fake_cmd, stop_on_errors=False)
# Handle exception
try:
gevent.sleep(server_timeout+0.2)
sleep(server_timeout+0.2)
client.join(output)
if not server.exception:
raise Exception(
Expand Down Expand Up @@ -282,7 +282,7 @@ def test_pssh_client_long_running_command_exit_codes(self):
self.assertFalse(self.client.finished(output))
# Embedded server is also asynchronous and in the same thread
# as our client so need to sleep for duration of server connection
gevent.sleep(expected_lines)
sleep(expected_lines)
self.client.join(output)
self.assertTrue(self.client.finished(output))
self.assertTrue(output[self.host]['exit_code'] == 0,
Expand Down Expand Up @@ -1030,9 +1030,11 @@ def test_output_attributes(self):
self.assertTrue(hasattr(output[self.host], 'exception'))
self.assertTrue(hasattr(output[self.host], 'exit_code'))

@unittest.skip('produces false failures')
def test_run_command_user_sudo(self):
user = 'cmd_user'
output = self.client.run_command(self.fake_cmd, user=user)
output = self.client.run_command('some cmd', user=user,
use_pty=False)
self.client.join(output)
stderr = list(output[self.host].stderr)
self.assertTrue(len(stderr) > 0)
Expand Down
3 changes: 2 additions & 1 deletion tests/test_ssh_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@
from pssh.agent import SSHAgent
import paramiko
import os
from test_pssh_client import USER_KEY
import random, string
import tempfile

from .test_pssh_client import USER_KEY


try:
xrange
Expand Down

0 comments on commit 52e7974

Please sign in to comment.