Normailze case in tests

This commit is contained in:
Tzu-ping Chung 2020-01-15 17:50:41 +08:00
parent 6e2e74ac29
commit 2dc061d960
2 changed files with 6 additions and 4 deletions

View File

@ -246,7 +246,7 @@ def test_get_repository_root(script):
tests_path.mkdir()
root1 = Git.get_repository_root(version_pkg_path)
assert root1 == version_pkg_path
assert os.path.normcase(root1) == os.path.normcase(version_pkg_path)
root2 = Git.get_repository_root(version_pkg_path.joinpath("tests"))
assert root2 == version_pkg_path
assert os.path.normcase(root2) == os.path.normcase(version_pkg_path)

View File

@ -1,3 +1,5 @@
import os
from pip._internal.vcs.mercurial import Mercurial
from tests.lib import _create_test_package, need_mercurial
@ -9,7 +11,7 @@ def test_get_repository_root(script):
tests_path.mkdir()
root1 = Mercurial.get_repository_root(version_pkg_path)
assert root1 == version_pkg_path
assert os.path.normcase(root1) == os.path.normcase(version_pkg_path)
root2 = Mercurial.get_repository_root(version_pkg_path.joinpath("tests"))
assert root2 == version_pkg_path
assert os.path.normcase(root2) == os.path.normcase(version_pkg_path)