Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use platform-specific file path separators to avoid tests

  dulwich.tests.test_web.DumbHandlersTestCase:test_get_idx_file
  dulwich.tests.test_web.DumbHandlersTestCase:test_get_pack_file

failing on Windows with "File not found" error.
  • Loading branch information...
commit 90c0c803f8613ff893e2708e81443375e31dcabb 1 parent 293de17
@kankri kankri authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 dulwich/tests/test_web.py
View
5 dulwich/tests/test_web.py
@@ -20,6 +20,7 @@
from cStringIO import StringIO
import re
+import os
from dulwich.object_store import (
MemoryObjectStore,
@@ -198,7 +199,7 @@ def as_legacy_object_error():
self.assertEquals(HTTP_ERROR, self._status)
def test_get_pack_file(self):
- pack_name = 'objects/pack/pack-%s.pack' % ('1' * 40)
+ pack_name = os.path.join('objects', 'pack', 'pack-%s.pack' % ('1' * 40))
backend = _test_backend([], named_files={pack_name: 'pack contents'})
mat = re.search('.*', pack_name)
output = ''.join(get_pack_file(self._req, backend, mat))
@@ -208,7 +209,7 @@ def test_get_pack_file(self):
self.assertTrue(self._req.cached)
def test_get_idx_file(self):
- idx_name = 'objects/pack/pack-%s.idx' % ('1' * 40)
+ idx_name = os.path.join('objects', 'pack', 'pack-%s.idx' % ('1' * 40))
backend = _test_backend([], named_files={idx_name: 'idx contents'})
mat = re.search('.*', idx_name)
output = ''.join(get_idx_file(self._req, backend, mat))
Please sign in to comment.
Something went wrong with that request. Please try again.