summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2017-10-23 18:10:41 -0700
committerJeff Forcier <jeff@bitprophet.org>2018-09-17 14:44:54 -0700
commit89d5da0d5d5785c83e25badbdea3972289b853ec (patch)
tree3ebd372a057c1ccd0a391ba999d8fe4c3aebbe81
parent3bba19c952d60272c037ad4ac7e1559f748eafe8 (diff)
Naturally, more tests I found that do not pass/fail correctly. Skip for now
-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 57aa8f2d..ac0d17fb 100755
--- a/tests/test_sftp.py
+++ b/tests/test_sftp.py
@@ -671,14 +671,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
@@ -686,7 +688,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:
@@ -736,11 +737,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()