diff options
| author | Karen Tracey <kmtracey@gmail.com> | 2012-09-09 15:07:04 -0400 |
|---|---|---|
| committer | Karen Tracey <kmtracey@gmail.com> | 2012-09-09 15:07:04 -0400 |
| commit | 2e928583861bc35f1ea137cb6f3353867f160bdb (patch) | |
| tree | aa5807cfe410c826513bd3566dcf0106dba16bef | |
| parent | fcec904e4f3582a45d4d8e309e71e9f0c4d79a0c (diff) | |
Fixed a couple of test failures on Windows.
| -rw-r--r-- | tests/regressiontests/utils/os_utils.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/tests/regressiontests/utils/os_utils.py b/tests/regressiontests/utils/os_utils.py index a78f348cf5..a205d67431 100644 --- a/tests/regressiontests/utils/os_utils.py +++ b/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, ) |
