~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_urlutils.py

  • Committer: John Arbash Meinel
  • Date: 2006-07-11 18:34:09 UTC
  • mto: This revision was merged to the branch mainline in revision 1851.
  • Revision ID: john@arbash-meinel.com-20060711183409-b07f0978208e1a26
list_files() with wrong normalized_filename code raises exceptions. Fix this

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
"""Tests for the urlutils wrapper."""
18
18
 
19
19
import os
 
20
import re
20
21
import sys
21
22
 
22
23
from bzrlib import osutils, urlutils
471
472
 
472
473
    def test_dot(self):
473
474
        # This test will fail if getcwd is not ascii
474
 
        cwd = osutils.getcwd()
475
 
        try:
476
 
            cwd = cwd.encode('ascii')
477
 
        except UnicodeError:
478
 
            raise TestSkipped('test must be run in an ASCII directory')
 
475
        os.mkdir('mytest')
 
476
        os.chdir('mytest')
479
477
 
480
478
        url = urlutils.local_path_to_url('.')
481
 
        self.assertEndsWith(url, cwd)
 
479
        self.assertEndsWith(url, '/mytest')
482
480
 
483
481
    def test_non_ascii(self):
484
482
        try: