~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-03-08 14:31:23 UTC
  • mfrom: (1598 +trunk)
  • mto: (1685.1.1 bzr-encoding)
  • mto: This revision was merged to the branch mainline in revision 1752.
  • Revision ID: john@arbash-meinel.com-20060308143123-448308b0db4de410
[merge] bzr.dev 1573, lots of updates

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