From 4e6f989169bff51348718fa398af10cdad83cd68 Mon Sep 17 00:00:00 2001 From: Christoph Zwerschke Date: Tue, 19 Apr 2016 21:45:48 +0200 Subject: Make tests pass under Windows --- pyramid/tests/test_config/test_views.py | 2 +- pyramid/tests/test_scripts/test_proutes.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pyramid/tests/test_config/test_views.py b/pyramid/tests/test_config/test_views.py index 21ed24f44..878574e88 100644 --- a/pyramid/tests/test_config/test_views.py +++ b/pyramid/tests/test_config/test_views.py @@ -3093,7 +3093,7 @@ class TestStaticURLInfo(unittest.TestCase): inst = self._makeOne() cb = DummyCacheBuster('foo') inst.add_cache_buster(config, here, cb) - self.assertEqual(inst.cache_busters, [(here + '/', cb, False)]) + self.assertEqual(inst.cache_busters, [(here + os.sep, cb, False)]) def test_add_cachebuster_overwrite(self): config = DummyConfig() diff --git a/pyramid/tests/test_scripts/test_proutes.py b/pyramid/tests/test_scripts/test_proutes.py index e426eee73..876572b01 100644 --- a/pyramid/tests/test_scripts/test_proutes.py +++ b/pyramid/tests/test_scripts/test_proutes.py @@ -1,3 +1,4 @@ +import os import unittest from pyramid.tests.test_scripts import dummy @@ -396,7 +397,8 @@ class TestPRoutesCommand(unittest.TestCase): from pyramid.renderers import null_renderer as nr config = self._makeConfig(autocommit=True) config.add_static_view('static', 'static', cache_max_age=3600) - config.add_static_view(name='static2', path='/var/www/static') + path2 = os.path.normpath('/var/www/static') + config.add_static_view(name='static2', path=path2) config.add_static_view( name='pyramid_scaffold', path='pyramid:scaffolds/starter/+package+/static' @@ -413,7 +415,7 @@ class TestPRoutesCommand(unittest.TestCase): expected = [ ['__static/', '/static/*subpath', 'pyramid.tests.test_scripts:static/', '*'], - ['__static2/', '/static2/*subpath', '/var/www/static/', '*'], + ['__static2/', '/static2/*subpath', path2 + os.sep, '*'], ['__pyramid_scaffold/', '/pyramid_scaffold/*subpath', 'pyramid:scaffolds/starter/+package+/static/', '*'], ] -- cgit v1.2.3