~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_osutils.py

  • Committer: Martin Pool
  • Date: 2006-10-29 01:49:34 UTC
  • mfrom: (2095.3.1 listdir)
  • mto: This revision was merged to the branch mainline in revision 2112.
  • Revision ID: mbp@sourcefrog.net-20061029014934-a5273eebfca6226d
merge listdir test fix so tests work on tmpfs

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005 Canonical Ltd
 
1
# Copyright (C) 2005, 2006 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
504
504
    def test_copy_basic_tree(self):
505
505
        self.build_tree(['source/', 'source/a', 'source/b/', 'source/b/c'])
506
506
        osutils.copy_tree('source', 'target')
507
 
        self.assertEqual(['a', 'b'], os.listdir('target'))
 
507
        self.assertEqual(['a', 'b'], sorted(os.listdir('target')))
508
508
        self.assertEqual(['c'], os.listdir('target/b'))
509
509
 
510
510
    def test_copy_tree_target_exists(self):
511
511
        self.build_tree(['source/', 'source/a', 'source/b/', 'source/b/c',
512
512
                         'target/'])
513
513
        osutils.copy_tree('source', 'target')
514
 
        self.assertEqual(['a', 'b'], os.listdir('target'))
 
514
        self.assertEqual(['a', 'b'], sorted(os.listdir('target')))
515
515
        self.assertEqual(['c'], os.listdir('target/b'))
516
516
 
517
517
    def test_copy_tree_symlinks(self):