~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bzrdir.py

  • Committer: John Arbash Meinel
  • Date: 2013-05-19 13:38:07 UTC
  • mfrom: (6015.57.4 2.4)
  • mto: (6437.63.10 2.5)
  • mto: This revision was merged to the branch mainline in revision 6575.
  • Revision ID: john@arbash-meinel.com-20130519133807-69kfoe85gw2va4y2
Try merging 2.4 into 2.5 and resolving the conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1575
1575
        # spaces are not allowed in feature names
1576
1576
        self.assertRaises(ValueError, SampleBzrFormat.register_feature,
1577
1577
            "nested trees")
 
1578
 
 
1579
 
 
1580
class ExtractFormatStringTests(TestCase):
 
1581
 
 
1582
    def test_normal(self):
 
1583
        self.assertEquals("Bazaar-NG branch, format 0.0.4\n",
 
1584
            bzrdir.extract_format_string("Bazaar-NG branch, format 0.0.4\n"))
 
1585
 
 
1586
    def test_with_optional_feature(self):
 
1587
        self.assertEquals("Bazaar-NG branch, format 0.0.4\n",
 
1588
            bzrdir.extract_format_string("Bazaar-NG branch, format 0.0.4\n"
 
1589
                                         "optional feature foo\n"))
 
1590
 
 
1591
    def test_with_required_feature(self):
 
1592
        self.assertRaises(errors.MissingFeature,
 
1593
            bzrdir.extract_format_string, "Bazaar-NG branch, format 0.0.4\n"
 
1594
                                          "required feature foo\n")
 
1595
 
 
1596
    def test_with_invalid_line(self):
 
1597
        self.assertRaises(errors.ParseFormatError,
 
1598
            bzrdir.extract_format_string, "Bazaar-NG branch, format 0.0.4\n"
 
1599
                                          "requiredfoo\n")