summaryrefslogtreecommitdiff
path: root/tests/test_sftp.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2017-10-23 18:10:41 -0700
committerJeff Forcier <jeff@bitprophet.org>2017-10-23 18:10:41 -0700
commit05822e920fb71b57cd60ebe44bae0dbc7af4dc74 (patch)
tree2ecbce2bf0d31310e328f1aaf49b63f510c42433 /tests/test_sftp.py
parent861b57fcb8f1cf045c2a6d2c40f7227aed6f4f95 (diff)
downloadparamiko-05822e920fb71b57cd60ebe44bae0dbc7af4dc74.tar.gz
Naturally, more tests I found that do not pass/fail correctly. Skip for now
Diffstat (limited to 'tests/test_sftp.py')
-rwxr-xr-xtests/test_sftp.py17
1 files changed, 5 insertions, 12 deletions
diff --git a/tests/test_sftp.py b/tests/test_sftp.py
index aa2c237d..57b5bc97 100755
--- a/tests/test_sftp.py
+++ b/tests/test_sftp.py
@@ -702,14 +702,16 @@ class TestSFTP(object):
finally:
sftp.remove(target)
+ # TODO: this test doesn't actually fail if the regression (removing '%'
+ # expansion to '%%' within sftp.py's def _log()) is removed - stacktraces
+ # appear but they're clearly emitted from subthreads that have no error
+ # handling. No point running it until that is fixed somehow.
+ @pytest.mark.skip("Doesn't prove anything right now")
def test_N_file_with_percent(self, sftp):
"""
verify that we can create a file with a '%' in the filename.
( it needs to be properly escaped by _log() )
"""
- # TODO: how best to enable this only for the one test? & how to make it
- # not log to actual file? lol??
- paramiko.util.log_to_file('test_sftp.log')
f = sftp.open(sftp.FOLDER + '/test%file', 'w')
try:
assert f.stat().st_size == 0
@@ -717,7 +719,6 @@ class TestSFTP(object):
f.close()
sftp.remove(sftp.FOLDER + '/test%file')
-
def test_O_non_utf8_data(self, sftp):
"""Test write() and read() of non utf8 data"""
try:
@@ -767,11 +768,3 @@ class TestSFTP(object):
assert f.read() == data
finally:
sftp.remove('%s/write_memoryview' % sftp.FOLDER)
-
-
-if __name__ == '__main__':
- SFTPTest.init_loopback()
- # logging is required by test_N_file_with_percent
- paramiko.util.log_to_file('test_sftp.log')
- from unittest import main
- main()