From 2dc061d9601ffebe840a41a5ec83364d27914594 Mon Sep 17 00:00:00 2001 From: Tzu-ping Chung Date: Wed, 15 Jan 2020 17:50:41 +0800 Subject: [PATCH] Normailze case in tests --- tests/functional/test_vcs_git.py | 4 ++-- tests/functional/test_vcs_mercurial.py | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/functional/test_vcs_git.py b/tests/functional/test_vcs_git.py index de1534a13..cee0a3cfe 100644 --- a/tests/functional/test_vcs_git.py +++ b/tests/functional/test_vcs_git.py @@ -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) diff --git a/tests/functional/test_vcs_mercurial.py b/tests/functional/test_vcs_mercurial.py index 38c66d5b0..841c4d821 100644 --- a/tests/functional/test_vcs_mercurial.py +++ b/tests/functional/test_vcs_mercurial.py @@ -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)