diff options
author | Robey Pointer <robey@lag.net> | 2004-09-11 20:37:59 +0000 |
---|---|---|
committer | Robey Pointer <robey@lag.net> | 2004-09-11 20:37:59 +0000 |
commit | 0e96d4a7e2495e4409fd1d9d629a77e41043e75e (patch) | |
tree | 486db1e4fe18f6959a66bfe8cfc107dffff923c8 /tests/test_sftp.py | |
parent | 8c9add1a6beba4a6fce6febe173130d3de328be5 (diff) |
[project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-81]
more unit tests
add test for BufferedFile.read(-1) and sftp.normalize().
Diffstat (limited to 'tests/test_sftp.py')
-rwxr-xr-x | tests/test_sftp.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/test_sftp.py b/tests/test_sftp.py index 3ff74ed5..e16b061b 100755 --- a/tests/test_sftp.py +++ b/tests/test_sftp.py @@ -15,7 +15,7 @@ # details. # # You should have received a copy of the GNU Lesser General Public License -# along with Foobar; if not, write to the Free Software Foundation, Inc., +# along with Paramiko; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ @@ -378,3 +378,14 @@ class SFTPTest (unittest.TestCase): self.assertEqual(sftp.stat('%s/hongry.txt' % FOLDER).st_size, 1024 * 1024) finally: sftp.remove('%s/hongry.txt' % FOLDER) + + def test_D_realpath(self): + """ + test that realpath is returning something non-empty and not an + error. + """ + pwd = sftp.normalize('.') + self.assert_(len(pwd) > 0) + f = sftp.normalize('./' + FOLDER) + self.assert_(len(f) > 0) + self.assert_(f == pwd + '/' + FOLDER) |