~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_lockdir.py

  • Committer: John Arbash Meinel
  • Date: 2006-09-29 20:12:58 UTC
  • mto: This revision was merged to the branch mainline in revision 2062.
  • Revision ID: john@arbash-meinel.com-20060929201258-c491e7ca6daefbb4
Make LockDir less sensitive to invalid configuration of email

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
import bzrlib
24
24
from bzrlib import (
 
25
    config,
25
26
    osutils,
26
27
    )
27
28
from bzrlib.errors import (
590
591
        self.assertContainsRe(info_list[1],
591
592
                              r'^held by .* on host .* \[process #\d*\]$')
592
593
        self.assertContainsRe(info_list[2], r'locked \d+ seconds? ago$')
 
594
 
 
595
    def test_lock_without_email(self):
 
596
        global_config = config.GlobalConfig()
 
597
        # Intentionally has no email address
 
598
        global_config.set_user_option('email', 'User Identity')
 
599
        ld1 = self.get_lock()
 
600
        ld1.create()
 
601
        ld1.lock_write()
 
602
        ld1.unlock()