File tree Expand file tree Collapse file tree 3 files changed +18
-13
lines changed Expand file tree Collapse file tree 3 files changed +18
-13
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ language: python
22cache : pip
33notifications :
44 email : false
5+ sudo : required
56services :
67 - docker
78python :
@@ -19,11 +20,14 @@ addons:
1920 - libssh2-1-dev
2021 - openssh-server
2122install :
22- - pip install flake8
23+ - pip install flake8 jinja2
2324 - python setup.py build_ext --inplace
2425 - eval "$(ssh-agent -s)"
2526script :
27+ - nosetests
28+ - flake8 ssh2
2629 - docker/build-packages.sh
30+ - ls -ltrh
2731deploy :
2832 - provider : pypi
2933 on :
Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ Super fast SSH2 protocol library. ``ssh2-python`` provides Python bindings for `
99.. image :: https://img.shields.io/pypi/v/ssh2-python.svg
1010 :target: https://pypi.python.org/pypi/ssh2-python
1111 :alt: Latest Version
12-
12+ .. image :: https://travis-ci.org/ParallelSSH/ssh2-python.svg?branch=master
13+ :target: https://travis-ci.org/ParallelSSH/ssh2-python
1314
1415Installation
1516______________
3031
3132.. code-block :: shell
3233
33- yum install libssh2-devel python-dev
34+ yum install libssh2-devel python-devel
3435 pip install ssh2-python
3536
3637
Original file line number Diff line number Diff line change @@ -169,16 +169,16 @@ def test_sftp(self):
169169 'remote_test_file' ])
170170 with open (remote_filename , 'wb' ) as test_fh :
171171 test_fh .write (test_file_data )
172- remote_fh = sftp .open (remote_filename , 0 , 0 )
173- try :
174- self .assertTrue (remote_fh is not None )
175- remote_data = b""
176- for data in remote_fh :
177- remote_data += data
178- self .assertEqual (remote_fh .close (), 0 )
179- self .assertEqual (remote_data , test_file_data )
180- finally :
181- os .unlink (remote_filename )
172+ with sftp .open (remote_filename , 0 , 0 ) as remote_fh :
173+ try :
174+ self .assertTrue (remote_fh is not None )
175+ remote_data = b""
176+ for data in remote_fh :
177+ remote_data += data
178+ self .assertEqual (remote_fh .close (), 0 )
179+ self .assertEqual (remote_data , test_file_data )
180+ finally :
181+ os .unlink (remote_filename )
182182
183183 def test_setenv (self ):
184184 self .assertEqual (self ._auth (), 0 )
You can’t perform that action at this time.
0 commit comments