/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 breezy/tests/test_xml.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2019-02-14 05:21:21 UTC
  • mfrom: (7122.5.2 xml-serializer-fix)
  • Revision ID: breezy.the.bot@gmail.com-20190214052121-w28alz6m1rd1r5l2
Properly format UnexpectedInventoryFormat errors.

Merged from https://code.launchpad.net/~jelmer/brz/xml-serializer-fix/+merge/362713

Show diffs side-by-side

added added

removed removed

Lines of Context:
511
511
 
512
512
        self.assertEqual(len(expected), len(actual))
513
513
 
 
514
    def test_serialization_error(self):
 
515
        s_v5 = breezy.bzr.xml5.serializer_v5
 
516
        e = self.assertRaises(
 
517
            errors.UnexpectedInventoryFormat,
 
518
            s_v5.read_inventory_from_string, b"<Notquitexml")
 
519
        self.assertEqual(str(e), "unclosed token: line 1, column 0")
 
520
 
514
521
 
515
522
class TestEncodeAndEscape(TestCase):
516
523
    """Whitebox testing of the _encode_and_escape function."""