/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to tests/test_roundtrip.py

  • Committer: Jelmer Vernooij
  • Date: 2010-05-05 09:58:55 UTC
  • mto: (0.200.912 trunk)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jelmer@samba.org-20100505095855-i0165hooflvk9chy
Ignore control files in inventories.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
        metadata = BzrGitRevisionMetadata()
54
54
        metadata.revision_id = "bla"
55
55
        self.assertEquals("revision-id: bla\n",
56
 
            generate_roundtripping_metadata(metadata, "utf-8"))
 
56
            generate_roundtripping_metadata(metadata))
57
57
 
58
58
    def test_parent_ids(self):
59
59
        metadata = BzrGitRevisionMetadata()
60
60
        metadata.explicit_parent_ids = ("foo", "bar")
61
61
        self.assertEquals("parent-ids: foo bar\n",
62
 
            generate_roundtripping_metadata(metadata, "utf-8"))
 
62
            generate_roundtripping_metadata(metadata))
63
63
 
64
64
    def test_properties(self):
65
65
        metadata = BzrGitRevisionMetadata()
66
66
        metadata.properties = {"foo": "bar"}
67
67
        self.assertEquals("property-foo: bar\n",
68
 
            generate_roundtripping_metadata(metadata, "utf-8"))
69
 
 
70
 
    def test_empty(self):
71
 
        metadata = BzrGitRevisionMetadata()
72
 
        self.assertEquals("",
73
 
            generate_roundtripping_metadata(metadata, "utf-8"))
 
68
            generate_roundtripping_metadata(metadata))
74
69
 
75
70
 
76
71
class ExtractMetadataTests(TestCase):
89
84
    def test_roundtrip(self):
90
85
        metadata = BzrGitRevisionMetadata()
91
86
        metadata.revision_id = "myrevid"
92
 
        msg = inject_bzr_metadata("Foo", metadata, "utf-8")
 
87
        msg = inject_bzr_metadata("Foo", metadata)
93
88
        self.assertEquals("""Foo
94
89
--BZR--
95
90
revision-id: myrevid
96
91
""", msg)
97
92
 
98
 
    def test_no_metadata(self):
99
 
        metadata = BzrGitRevisionMetadata()
100
 
        msg = inject_bzr_metadata("Foo", metadata, "utf-8")
101
 
        self.assertEquals("Foo", msg)
102
 
 
103
93
 
104
94
class FileIdRoundTripTests(TestCase):
105
95