/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_rio.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-06-11 12:46:45 UTC
  • mfrom: (7511.1.1 actions-no-fork)
  • Revision ID: breezy.the.bot@gmail.com-20200611124645-4lx66gps99i0hmzh
Avoid using fork when running the testsuite in github actions.

Merged from https://code.launchpad.net/~jelmer/brz/actions-no-fork/+merge/385565

Show diffs side-by-side

added added

removed removed

Lines of Context:
328
328
        s = Stanza()
329
329
        self.assertRaises(TypeError, s.add, 10, {})
330
330
 
331
 
    def test_rio_surrogateescape(self):
332
 
        raw_bytes = b'\xcb'
333
 
        self.assertRaises(UnicodeDecodeError, raw_bytes.decode, 'utf-8')
334
 
        try:
335
 
            uni_data = raw_bytes.decode('utf-8', 'surrogateescape')
336
 
        except LookupError:
337
 
            self.skipTest('surrogateescape is not available on Python < 3')
338
 
        s = Stanza(foo=uni_data)
339
 
        self.assertEqual(s.get('foo'), uni_data)
340
 
        raw_lines = s.to_lines()
341
 
        self.assertEqual(raw_lines,
342
 
                         [b'foo: ' + uni_data.encode('utf-8', 'surrogateescape') + b'\n'])
343
 
        new_s = read_stanza(raw_lines)
344
 
        self.assertEqual(new_s.get('foo'), uni_data)
345
 
 
346
331
    def test_rio_unicode(self):
347
332
        uni_data = u'\N{KATAKANA LETTER O}'
348
333
        s = Stanza(foo=uni_data)