diff -r ffd3e823a7e5 -r 4452cb788404 tests/test-hg-parseurl.py --- a/tests/test-hg-parseurl.py Mon Apr 12 03:01:04 2021 +0200 +++ b/tests/test-hg-parseurl.py Mon Apr 12 06:34:54 2021 +0200 @@ -2,44 +2,48 @@ import unittest -from mercurial import hg +from mercurial.utils import urlutil class ParseRequestTests(unittest.TestCase): def testparse(self): self.assertEqual( - hg.parseurl(b'http://example.com/no/anchor'), + urlutil.parseurl(b'http://example.com/no/anchor'), (b'http://example.com/no/anchor', (None, [])), ) self.assertEqual( - hg.parseurl(b'http://example.com/an/anchor#foo'), + urlutil.parseurl(b'http://example.com/an/anchor#foo'), (b'http://example.com/an/anchor', (b'foo', [])), ) self.assertEqual( - hg.parseurl(b'http://example.com/no/anchor/branches', [b'foo']), + urlutil.parseurl( + b'http://example.com/no/anchor/branches', [b'foo'] + ), (b'http://example.com/no/anchor/branches', (None, [b'foo'])), ) self.assertEqual( - hg.parseurl(b'http://example.com/an/anchor/branches#bar', [b'foo']), + urlutil.parseurl( + b'http://example.com/an/anchor/branches#bar', [b'foo'] + ), (b'http://example.com/an/anchor/branches', (b'bar', [b'foo'])), ) self.assertEqual( - hg.parseurl( + urlutil.parseurl( b'http://example.com/an/anchor/branches-None#foo', None ), (b'http://example.com/an/anchor/branches-None', (b'foo', [])), ) self.assertEqual( - hg.parseurl(b'http://example.com/'), + urlutil.parseurl(b'http://example.com/'), (b'http://example.com/', (None, [])), ) self.assertEqual( - hg.parseurl(b'http://example.com'), + urlutil.parseurl(b'http://example.com'), (b'http://example.com/', (None, [])), ) self.assertEqual( - hg.parseurl(b'http://example.com#foo'), + urlutil.parseurl(b'http://example.com#foo'), (b'http://example.com/', (b'foo', [])), )