diff options
author | Daniel Kutik <daniel.kutik@lavawerk.com> | 2022-11-27 13:26:15 +0100 |
---|---|---|
committer | Daniel Kutik <daniel.kutik@lavawerk.com> | 2022-11-27 17:03:01 +0000 |
commit | 0297f8312c5cd80cf5d2ffc3f0915b00647b03e5 (patch) | |
tree | 09308f5bb9d1b7f37fdea40f70cac77d67cd0a00 /tests/test_manifest_xml.py | |
parent | 7b3afcab7a746a2bd568b3df590b7bba4f9a4d23 (diff) | |
download | git-repo-0297f8312c5cd80cf5d2ffc3f0915b00647b03e5.tar.gz |
test: fix path seperator errors on windows
Fixing multiple errors when running tests on Windows related
to path seperator being different ('\' instead of '/').
Signed-off-by: Daniel Kutik <daniel.kutik@lavawerk.com>
Change-Id: I26b44d092b925edecab46a4d88e77dd9dcb8df28
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353178
Reviewed-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'tests/test_manifest_xml.py')
-rw-r--r-- | tests/test_manifest_xml.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/test_manifest_xml.py b/tests/test_manifest_xml.py index f92108e1..0e649a67 100644 --- a/tests/test_manifest_xml.py +++ b/tests/test_manifest_xml.py | |||
@@ -519,22 +519,22 @@ class ProjectElementTests(ManifestParseTestCase): | |||
519 | """) | 519 | """) |
520 | 520 | ||
521 | manifest = parse('a/path/', 'foo') | 521 | manifest = parse('a/path/', 'foo') |
522 | self.assertEqual(manifest.projects[0].gitdir, | 522 | self.assertEqual(os.path.normpath(manifest.projects[0].gitdir), |
523 | os.path.join(self.tempdir, '.repo/projects/foo.git')) | 523 | os.path.join(self.tempdir, '.repo', 'projects', 'foo.git')) |
524 | self.assertEqual(manifest.projects[0].objdir, | 524 | self.assertEqual(os.path.normpath(manifest.projects[0].objdir), |
525 | os.path.join(self.tempdir, '.repo/project-objects/a/path.git')) | 525 | os.path.join(self.tempdir, '.repo', 'project-objects', 'a', 'path.git')) |
526 | 526 | ||
527 | manifest = parse('a/path', 'foo/') | 527 | manifest = parse('a/path', 'foo/') |
528 | self.assertEqual(manifest.projects[0].gitdir, | 528 | self.assertEqual(os.path.normpath(manifest.projects[0].gitdir), |
529 | os.path.join(self.tempdir, '.repo/projects/foo.git')) | 529 | os.path.join(self.tempdir, '.repo', 'projects', 'foo.git')) |
530 | self.assertEqual(manifest.projects[0].objdir, | 530 | self.assertEqual(os.path.normpath(manifest.projects[0].objdir), |
531 | os.path.join(self.tempdir, '.repo/project-objects/a/path.git')) | 531 | os.path.join(self.tempdir, '.repo', 'project-objects', 'a', 'path.git')) |
532 | 532 | ||
533 | manifest = parse('a/path', 'foo//////') | 533 | manifest = parse('a/path', 'foo//////') |
534 | self.assertEqual(manifest.projects[0].gitdir, | 534 | self.assertEqual(os.path.normpath(manifest.projects[0].gitdir), |
535 | os.path.join(self.tempdir, '.repo/projects/foo.git')) | 535 | os.path.join(self.tempdir, '.repo', 'projects', 'foo.git')) |
536 | self.assertEqual(manifest.projects[0].objdir, | 536 | self.assertEqual(os.path.normpath(manifest.projects[0].objdir), |
537 | os.path.join(self.tempdir, '.repo/project-objects/a/path.git')) | 537 | os.path.join(self.tempdir, '.repo', 'project-objects', 'a', 'path.git')) |
538 | 538 | ||
539 | def test_toplevel_path(self): | 539 | def test_toplevel_path(self): |
540 | """Check handling of path=. specially.""" | 540 | """Check handling of path=. specially.""" |
@@ -551,8 +551,8 @@ class ProjectElementTests(ManifestParseTestCase): | |||
551 | 551 | ||
552 | for path in ('.', './', './/', './//'): | 552 | for path in ('.', './', './/', './//'): |
553 | manifest = parse('server/path', path) | 553 | manifest = parse('server/path', path) |
554 | self.assertEqual(manifest.projects[0].gitdir, | 554 | self.assertEqual(os.path.normpath(manifest.projects[0].gitdir), |
555 | os.path.join(self.tempdir, '.repo/projects/..git')) | 555 | os.path.join(self.tempdir, '.repo', 'projects', '..git')) |
556 | 556 | ||
557 | def test_bad_path_name_checks(self): | 557 | def test_bad_path_name_checks(self): |
558 | """Check handling of bad path & name attributes.""" | 558 | """Check handling of bad path & name attributes.""" |