summaryrefslogtreecommitdiffstats
path: root/tests/test_manifest_xml.py
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2020-02-19 22:36:26 -0500
committerDavid Pursehouse <dpursehouse@collab.net>2020-02-21 05:17:05 +0000
commitd9254599f9bb47632313ecb90c5f281ceca5da3a (patch)
tree5c1bdb0815f5a027f0de194b488ba254719c7c11 /tests/test_manifest_xml.py
parent746e7f664e306e823a40cd95a127516aa522ed8f (diff)
downloadgit-repo-d9254599f9bb47632313ecb90c5f281ceca5da3a.tar.gz
manifest/tests: get them passing under Windows
We also need to check more things in the manifest/project handlers, and use platform_utils in a few places to address Windows behavior. Drop Python 2.7 from Windows testing as it definitely doesn't work and we won't be fixing it. Change-Id: I83d00ee9f1612312bb3f7147cb9535fc61268245 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/256113 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: Jonathan Nieder <jrn@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
Diffstat (limited to 'tests/test_manifest_xml.py')
-rw-r--r--tests/test_manifest_xml.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_manifest_xml.py b/tests/test_manifest_xml.py
index b6ec5b86..1cb72971 100644
--- a/tests/test_manifest_xml.py
+++ b/tests/test_manifest_xml.py
@@ -18,6 +18,7 @@
18 18
19from __future__ import print_function 19from __future__ import print_function
20 20
21import os
21import unittest 22import unittest
22 23
23import error 24import error
@@ -78,6 +79,11 @@ class ManifestValidateFilePaths(unittest.TestCase):
78 # Block Unicode characters that get normalized out by filesystems. 79 # Block Unicode characters that get normalized out by filesystems.
79 u'foo\u200Cbar', 80 u'foo\u200Cbar',
80 ) 81 )
82 # Make sure platforms that use path separators (e.g. Windows) are also
83 # rejected properly.
84 if os.path.sep != '/':
85 PATHS += tuple(x.replace('/', os.path.sep) for x in PATHS)
86
81 for path in PATHS: 87 for path in PATHS:
82 self.assertRaises( 88 self.assertRaises(
83 error.ManifestInvalidPathError, self.check_both, path, 'a') 89 error.ManifestInvalidPathError, self.check_both, path, 'a')