~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: 2009-02-23 15:29:35 UTC
  • mfrom: (3943.7.7 bzr.code_style_cleanup)
  • mto: This revision was merged to the branch mainline in revision 4033.
  • Revision ID: john@arbash-meinel.com-20090223152935-oel9m92mwcc6nb4h
Merge the removal of all trailing whitespace, and resolve conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
171
171
                         (['src'], 'src'),
172
172
                         ]:
173
173
            self.assert_(is_inside_or_parent_of_any(dirs, fn))
174
 
            
 
174
 
175
175
        for dirs, fn in [(['src'], 'srccontrol'),
176
176
                         (['srccontrol/foo.c'], 'src'),
177
177
                         (['src'], 'srccontrol/foo')]:
202
202
        if osutils.has_symlinks():
203
203
            os.symlink('symlink', 'symlink')
204
204
            self.assertEquals('symlink', osutils.file_kind('symlink'))
205
 
        
 
205
 
206
206
        # TODO: jam 20060529 Test a block device
207
207
        try:
208
208
            os.lstat('/dev/null')
310
310
        self.assertEqual(bar_path, osutils.realpath('./bar'))
311
311
        os.symlink('bar', 'foo')
312
312
        self.assertEqual(bar_path, osutils.realpath('./foo'))
313
 
        
 
313
 
314
314
        # Does not dereference terminal symlinks
315
315
        foo_path = osutils.pathjoin(cwd, 'foo')
316
316
        self.assertEqual(foo_path, osutils.dereference_path('./foo'))
692
692
 
693
693
class TestWin32FuncsDirs(TestCaseInTempDir):
694
694
    """Test win32 functions that create files."""
695
 
    
 
695
 
696
696
    def test_getcwd(self):
697
697
        if win32utils.winver == 'Windows 98':
698
698
            raise TestSkipped('Windows 98 cannot handle unicode filenames')
1330
1330
 
1331
1331
 
1332
1332
class TestCopyTree(TestCaseInTempDir):
1333
 
    
 
1333
 
1334
1334
    def test_copy_basic_tree(self):
1335
1335
        self.build_tree(['source/', 'source/a', 'source/b/', 'source/b/c'])
1336
1336
        osutils.copy_tree('source', 'target')
1415
1415
 
1416
1416
    def test_unicode(self):
1417
1417
        """Environment can only contain plain strings
1418
 
        
 
1418
 
1419
1419
        So Unicode strings must be encoded.
1420
1420
        """
1421
1421
        uni_val, env_val = probe_unicode_in_user_encoding()