~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_osutils.py

  • Committer: John Arbash Meinel
  • Date: 2006-05-27 05:54:50 UTC
  • mto: (1711.2.26 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1734.
  • Revision ID: john@arbash-meinel.com-20060527055450-acbbfbf55c3c4aa5
Updated version of file_kind. Rather than multiple function calls, one mask + dictionary lookup

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
        self.failIfExists('dir/file')
91
91
        self.failIfExists('dir')
92
92
 
 
93
    def test_file_kind(self):
 
94
        self.build_tree(['file', 'dir/'])
 
95
        self.assertEquals('file', osutils.file_kind('file'))
 
96
        self.assertEquals('directory', osutils.file_kind('dir/'))
 
97
        if osutils.has_symlinks():
 
98
            os.symlink('symlink', 'symlink')
 
99
            self.assertEquals('symlink', osutils.file_kind('symlink'))
 
100
        #TODO: jam 20060527 Test nodes, sockets, fifos, etc
 
101
 
93
102
 
94
103
class TestSafeUnicode(TestCase):
95
104