From 6602250f7c7c7b408e475d0b609266677046ab41 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 8 Dec 2011 17:24:23 -0500 Subject: coverage and avoid whining on py27/py32 about failUnless --- pyramid/path.py | 2 +- pyramid/tests/test_path.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyramid/path.py b/pyramid/path.py index 540b1c5df..bf0aac2f4 100644 --- a/pyramid/path.py +++ b/pyramid/path.py @@ -75,7 +75,7 @@ def package_path(package): return prefix class _CALLER_PACKAGE(object): - def __repr__(self): # for docs + def __repr__(self): # pragma: no cover (for docs) return 'pyramid.path.CALLER_PACKAGE' CALLER_PACKAGE = _CALLER_PACKAGE() diff --git a/pyramid/tests/test_path.py b/pyramid/tests/test_path.py index ac51c92d7..304afad7c 100644 --- a/pyramid/tests/test_path.py +++ b/pyramid/tests/test_path.py @@ -223,21 +223,21 @@ class TestAssetResolver(unittest.TestCase): inst = self._makeOne(None) r = inst.resolve(os.path.join(here, 'test_asset.py')) self.assertEqual(r.__class__, FSAssetDescriptor) - self.failUnless(r.exists()) + self.assertTrue(r.exists()) def test_resolve_absspec(self): from pyramid.path import PkgResourcesAssetDescriptor inst = self._makeOne(None) r = inst.resolve('pyramid.tests:test_asset.py') self.assertEqual(r.__class__, PkgResourcesAssetDescriptor) - self.failUnless(r.exists()) + self.assertTrue(r.exists()) def test_resolve_relspec_with_pkg(self): from pyramid.path import PkgResourcesAssetDescriptor inst = self._makeOne('pyramid.tests') r = inst.resolve('test_asset.py') self.assertEqual(r.__class__, PkgResourcesAssetDescriptor) - self.failUnless(r.exists()) + self.assertTrue(r.exists()) def test_resolve_relspec_no_package(self): inst = self._makeOne(None) @@ -249,7 +249,7 @@ class TestAssetResolver(unittest.TestCase): inst = self._makeOne(CALLER_PACKAGE) r = inst.resolve('test_asset.py') self.assertEqual(r.__class__, PkgResourcesAssetDescriptor) - self.failUnless(r.exists()) + self.assertTrue(r.exists()) class TestPkgResourcesAssetDescriptor(unittest.TestCase): def _getTargetClass(self): -- cgit v1.2.3