/breezy/unstable

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

« back to all changes in this revision

Viewing changes to breezy/tests/test_urlutils.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import os
20
20
import sys
21
21
 
22
 
from bzrlib import osutils, urlutils, win32utils
23
 
from bzrlib.errors import (
 
22
from .. import osutils, urlutils, win32utils
 
23
from ..errors import (
24
24
    InvalidURL,
25
25
    InvalidURLJoin,
26
26
    InvalidRebaseURLs,
27
27
    PathNotChild,
28
28
    )
29
 
from bzrlib.tests import features, TestCaseInTempDir, TestCase, TestSkipped
 
29
from . import features, TestCaseInTempDir, TestCase, TestSkipped
30
30
 
31
31
 
32
32
class TestUrlToPath(TestCase):
33
33
 
34
34
    def test_basename(self):
35
 
        # bzrlib.urlutils.basename
36
 
        # Test bzrlib.urlutils.split()
 
35
        # breezy.urlutils.basename
 
36
        # Test breezy.urlutils.split()
37
37
        basename = urlutils.basename
38
38
        if sys.platform == 'win32':
39
39
            self.assertRaises(InvalidURL, basename, 'file:///path/to/foo')
167
167
        test_one('ab://foo', ('ab', 'foo'))
168
168
 
169
169
    def test_dirname(self):
170
 
        # Test bzrlib.urlutils.dirname()
 
170
        # Test breezy.urlutils.dirname()
171
171
        dirname = urlutils.dirname
172
172
        if sys.platform == 'win32':
173
173
            self.assertRaises(InvalidURL, dirname, 'file:///path/to/foo')
471
471
        self.assertRaises(InvalidURL, extract, 'file://', '/C:ool')
472
472
 
473
473
    def test_split(self):
474
 
        # Test bzrlib.urlutils.split()
 
474
        # Test breezy.urlutils.split()
475
475
        split = urlutils.split
476
476
        if sys.platform == 'win32':
477
477
            self.assertRaises(InvalidURL, split, 'file:///path/to/foo')