~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_osutils.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-02-22 07:59:56 UTC
  • mfrom: (1553.5.33 bzr.mbp.locks)
  • Revision ID: pqm@pqm.ubuntu.com-20060222075956-fb281c427e571da6
add LockDir and related fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
 
60
60
        self.check_file_contents('a', 'something in a\n')
61
61
 
62
 
 
63
62
    # TODO: test fancy_rename using a MemoryTransport
64
63
 
 
64
    def test_01_rand_chars_empty(self):
 
65
        result = osutils.rand_chars(0)
 
66
        self.assertEqual(result, '')
 
67
 
 
68
    def test_02_rand_chars_100(self):
 
69
        result = osutils.rand_chars(100)
 
70
        self.assertEqual(len(result), 100)
 
71
        self.assertEqual(type(result), str)
 
72
        self.assertContainsRe(result, r'^[a-z0-9]{100}$')
 
73
 
65
74
 
66
75
class TestSafeUnicode(TestCase):
67
76