/breezy/3.0

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/3.0

« back to all changes in this revision

Viewing changes to breezy/tests/test_export_pot.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-02-07 01:31:19 UTC
  • mfrom: (7339.1.1 3.8-compat)
  • Revision ID: breezy.the.bot@gmail.com-20200207013119-gjgp9hj299ybun6d
More improvements to make tests success with Python 3.8.

Merged from https://code.launchpad.net/~jelmer/brz/3.8-compat/+merge/378691

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
import re
 
18
import sys
18
19
import textwrap
19
20
 
20
21
from io import StringIO
149
150
    )
150
151
'''
151
152
        _, str_lines = export_pot._parse_source(src)
152
 
        self.expectFailure("Escaped newlines confuses the multiline handling",
153
 
                           self.assertNotEqual, str_lines,
154
 
                           {"Escaped\n": 0, "Raw\\n": 2, "A\n\nB\n\nC\n\n": -2})
155
 
        self.assertEqual(str_lines,
156
 
                         {"Escaped\n": 1, "Raw\\n": 2, "A\n\nB\n\nC\n\n": 4})
 
153
        if sys.version_info < (3, 8):
 
154
            self.expectFailure("Escaped newlines confuses the multiline handling",
 
155
                               self.assertNotEqual, str_lines,
 
156
                               {"Escaped\n": 0, "Raw\\n": 2, "A\n\nB\n\nC\n\n": -2})
 
157
        else:
 
158
            self.assertEqual(
 
159
                str_lines, {"Escaped\n": 1, "Raw\\n": 2, "A\n\nB\n\nC\n\n": 4})
157
160
 
158
161
 
159
162
class TestModuleContext(tests.TestCase):