~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-03-06 11:20:10 UTC
  • mfrom: (1593 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1611.
  • Revision ID: mbp@sourcefrog.net-20060306112010-17c0170dde5d1eea
[merge] large merge to sync with bzr.dev

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