diff options
| author | Michael Merickel <michael@merickel.org> | 2018-10-31 01:36:26 -0500 |
|---|---|---|
| committer | Michael Merickel <michael@merickel.org> | 2018-11-12 21:39:23 -0600 |
| commit | 6b0e4625da2c53a1e3fdb4857fc7c6ba6ce562cf (patch) | |
| tree | 5d115273784eb021e5550539e39f552672921329 /tests/test_config | |
| parent | 7429fcb5a96aa10bbe86da08bd0b30c9292efdde (diff) | |
| download | pyramid-6b0e4625da2c53a1e3fdb4857fc7c6ba6ce562cf.tar.gz pyramid-6b0e4625da2c53a1e3fdb4857fc7c6ba6ce562cf.tar.bz2 pyramid-6b0e4625da2c53a1e3fdb4857fc7c6ba6ce562cf.zip | |
initial work to remove py2 from the codebase
Diffstat (limited to 'tests/test_config')
| -rw-r--r-- | tests/test_config/test_adapters.py | 6 | ||||
| -rw-r--r-- | tests/test_config/test_factories.py | 7 | ||||
| -rw-r--r-- | tests/test_config/test_init.py | 3 |
3 files changed, 2 insertions, 14 deletions
diff --git a/tests/test_config/test_adapters.py b/tests/test_config/test_adapters.py index d871e8825..60a4f3090 100644 --- a/tests/test_config/test_adapters.py +++ b/tests/test_config/test_adapters.py @@ -1,6 +1,5 @@ import unittest -from pyramid.compat import PY2 from . import IDummy @@ -270,10 +269,7 @@ class AdaptersConfiguratorMixinTests(unittest.TestCase): from pyramid.interfaces import IResponse config = self._makeOne(autocommit=True) - if PY2: - str_name = '__builtin__.str' - else: - str_name = 'builtins.str' + str_name = 'builtins.str' config.add_response_adapter('pyramid.response.Response', str_name) result = config.registry.queryAdapter('foo', IResponse) self.assertTrue(result.body, b'foo') diff --git a/tests/test_config/test_factories.py b/tests/test_config/test_factories.py index c03d3f68b..cca528275 100644 --- a/tests/test_config/test_factories.py +++ b/tests/test_config/test_factories.py @@ -161,7 +161,6 @@ class TestFactoriesMixin(unittest.TestCase): self.assertRaises(AttributeError, config.add_request_method) def test_add_request_method_with_text_type_name(self): - from pyramid.compat import text_, PY2 from pyramid.exceptions import ConfigurationError config = self._makeOne(autocommit=True) @@ -170,11 +169,7 @@ class TestFactoriesMixin(unittest.TestCase): pass def get_bad_name(): - if PY2: - name = text_(b'La Pe\xc3\xb1a', 'utf-8') - else: - name = b'La Pe\xc3\xb1a' - + name = b'La Pe\xc3\xb1a' config.add_request_method(boomshaka, name=name) self.assertRaises(ConfigurationError, get_bad_name) diff --git a/tests/test_config/test_init.py b/tests/test_config/test_init.py index 811672fb3..1cd63f113 100644 --- a/tests/test_config/test_init.py +++ b/tests/test_config/test_init.py @@ -2,7 +2,6 @@ import os import unittest from pyramid.compat import im_func -from pyramid.testing import skip_on from . import dummy_tween_factory from . import dummy_include @@ -1157,7 +1156,6 @@ test_config.dummy_include2""" "@view_config(name='two', renderer='string')" in which ) - @skip_on('py3') def test_hook_zca(self): from zope.component import getSiteManager @@ -1173,7 +1171,6 @@ test_config.dummy_include2""" finally: getSiteManager.reset() - @skip_on('py3') def test_unhook_zca(self): from zope.component import getSiteManager |
