~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_commit.py

  • Committer: Patch Queue Manager
  • Date: 2011-11-21 01:26:51 UTC
  • mfrom: (6280.2.4 commit-time-format)
  • Revision ID: pqm@pqm.ubuntu.com-20111121012651-prdfm12cb04wtdkm
(jelmer) Improve parsing of commit times in --commit-time argument for ``bzr
 commit``. (Matt Giuca)

Show diffs side-by-side

added added

removed removed

Lines of Context:
704
704
        self.assertStartsWith(
705
705
            err, "bzr: ERROR: Could not parse --commit-time:")
706
706
 
 
707
    def test_commit_time_missing_tz(self):
 
708
        tree = self.make_branch_and_tree('tree')
 
709
        self.build_tree(['tree/hello.txt'])
 
710
        tree.add('hello.txt')
 
711
        out, err = self.run_bzr("commit -m hello "
 
712
            "--commit-time='2009-10-10 08:00:00' tree/hello.txt", retcode=3)
 
713
        self.assertStartsWith(
 
714
            err, "bzr: ERROR: Could not parse --commit-time:")
 
715
        # Test that it is actually checking and does not simply crash with
 
716
        # some other exception
 
717
        self.assertContainsString(err, "missing a timezone offset")
 
718
 
707
719
    def test_partial_commit_with_renames_in_tree(self):
708
720
        # this test illustrates bug #140419
709
721
        t = self.make_branch_and_tree('.')