Skip to content

Commit

Permalink
Use platform-specific file path separators to avoid tests
Browse files Browse the repository at this point in the history
  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
kankri committed Jan 17, 2012
1 parent 293de17 commit 90c0c80
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dulwich/tests/test_web.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@


from cStringIO import StringIO from cStringIO import StringIO
import re import re
import os


from dulwich.object_store import ( from dulwich.object_store import (
MemoryObjectStore, MemoryObjectStore,
Expand Down Expand Up @@ -198,7 +199,7 @@ def as_legacy_object_error():
self.assertEquals(HTTP_ERROR, self._status) self.assertEquals(HTTP_ERROR, self._status)


def test_get_pack_file(self): 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'}) backend = _test_backend([], named_files={pack_name: 'pack contents'})
mat = re.search('.*', pack_name) mat = re.search('.*', pack_name)
output = ''.join(get_pack_file(self._req, backend, mat)) output = ''.join(get_pack_file(self._req, backend, mat))
Expand All @@ -208,7 +209,7 @@ def test_get_pack_file(self):
self.assertTrue(self._req.cached) self.assertTrue(self._req.cached)


def test_get_idx_file(self): 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'}) backend = _test_backend([], named_files={idx_name: 'idx contents'})
mat = re.search('.*', idx_name) mat = re.search('.*', idx_name)
output = ''.join(get_idx_file(self._req, backend, mat)) output = ''.join(get_idx_file(self._req, backend, mat))
Expand Down

0 comments on commit 90c0c80

Please sign in to comment.