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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-09-11 04:20:02 UTC
  • mfrom: (7078.15.2 some-more)
  • Revision ID: breezy.the.bot@gmail.com-20180911042002-ypajcg75djohngdv
Fix a couple more tests on Python 3.

Merged from https://code.launchpad.net/~jelmer/brz/some-more/+merge/353541

Show diffs side-by-side

added added

removed removed

Lines of Context:
126
126
        eq('http://host/~bob%2525-._',
127
127
                normalize_url(u'http://host/%7Ebob%2525%2D%2E%5F'))
128
128
 
129
 
        # Normalize verifies URLs when they are not unicode
130
 
        # (indicating they did not come from the user)
131
 
        self.assertRaises(urlutils.InvalidURL, normalize_url,
132
 
                'http://host/\xb5')
133
 
        self.assertRaises(urlutils.InvalidURL, normalize_url, 'http://host/ ')
 
129
        if not PY3:
 
130
            # On Python 2, normalize verifies URLs when they are not unicode
 
131
            # (indicating they did not come from the user)
 
132
            self.assertRaises(urlutils.InvalidURL, normalize_url,
 
133
                    b'http://host/\xb5')
 
134
            self.assertRaises(urlutils.InvalidURL, normalize_url, b'http://host/ ')
134
135
 
135
136
    def test_url_scheme_re(self):
136
137
        # Test paths that may be URLs