Skip to content

Commit

Permalink
Fixed a couple of test failures on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
kmtracey committed Sep 9, 2012
1 parent fcec904 commit 2e92858
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions tests/regressiontests/utils/os_utils.py
@@ -1,21 +1,26 @@
import os

from django.utils import unittest
from django.utils._os import safe_join


class SafeJoinTests(unittest.TestCase):
def test_base_path_ends_with_sep(self):
drive, path = os.path.splitdrive(safe_join("/abc/", "abc"))
self.assertEqual(
safe_join("/abc/", "abc"),
"/abc/abc",
path,
"{0}abc{0}abc".format(os.path.sep)
)

def test_root_path(self):
drive, path = os.path.splitdrive(safe_join("/", "path"))
self.assertEqual(
safe_join("/", "path"),
"/path",
path,
"{0}path".format(os.path.sep),
)

drive, path = os.path.splitdrive(safe_join("/", ""))
self.assertEqual(
safe_join("/", ""),
"/",
path,
os.path.sep,
)

0 comments on commit 2e92858

Please sign in to comment.