Skip to content

Commit

Permalink
fixes to #33 test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomer Filiba committed Jul 26, 2012
1 parent 13c972c commit d0a8a2c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions tests/test_local.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
from __future__ import with_statement
import os
import unittest
import six
from plumbum import local, LocalPath, FG, BG, ERROUT
from plumbum import CommandNotFound, ProcessExecutionError, ProcessTimedOut


class LocalPathTest(unittest.TestCase):
def test_basename(self):
name = LocalPath("/some/long/path/to/file.txt").basename
self.assertIsInstance(name, basestring)
self.assertTrue(isinstance(name, six.string_types))
self.assertEqual("file.txt", str(name))

def test_dirname(self):
name = LocalPath("/some/long/path/to/file.txt").dirname
self.assertIsInstance(name, LocalPath)
self.assertTrue(isinstance(name, LocalPath))
self.assertEqual("/some/long/path/to", str(name))


Expand Down
4 changes: 2 additions & 2 deletions tests/test_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
class RemotePathTest(unittest.TestCase):
def test_basename(self):
name = RemotePath(SshMachine("localhost"), "/some/long/path/to/file.txt").basename
self.assertIsInstance(name, basestring)
self.assertTrue(isinstance(name, six.string_types))
self.assertEqual("file.txt", str(name))

def test_dirname(self):
name = RemotePath(SshMachine("localhost"), "/some/long/path/to/file.txt").dirname
self.assertIsInstance(name, RemotePath)
self.assertTrue(isinstance(name, RemotePath))
self.assertEqual("/some/long/path/to", str(name))


Expand Down

0 comments on commit d0a8a2c

Please sign in to comment.