From 3593a10643a42596f2531240979fb59149804d48 Mon Sep 17 00:00:00 2001 From: Daniel Kutik Date: Sun, 27 Nov 2022 13:35:42 +0100 Subject: [PATCH] test_bad_path_name_checks: allow Windows path sep With this change if a path ends with '/' on Linux/macOS and ends with either '/' or '\' on Windows, the test will pass. Signed-off-by: Daniel Kutik Change-Id: Id7d1b134f9c0bdf7ceaf149af304bbf90cbd7b21 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353180 Reviewed-by: Mike Frysinger --- tests/test_manifest_xml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_manifest_xml.py b/tests/test_manifest_xml.py index 8aa97e70..c7e814a3 100644 --- a/tests/test_manifest_xml.py +++ b/tests/test_manifest_xml.py @@ -578,7 +578,7 @@ class ProjectElementTests(ManifestParseTestCase): parse('', 'ok') for path in INVALID_FS_PATHS: - if not path or path.endswith('/'): + if not path or path.endswith('/') or path.endswith(os.path.sep): continue with self.assertRaises(error.ManifestInvalidPathError):