use paren-bracketed imports for modules from the same source
| | |
| | | import unittest |
| | | from pyramid import testing |
| | | from pyramid.compat import text_ |
| | | from pyramid.compat import bytes_ |
| | | from pyramid.compat import ( |
| | | text_, |
| | | bytes_, |
| | | ) |
| | | |
| | | class TestCallbackAuthenticationPolicyDebugging(unittest.TestCase): |
| | | def setUp(self): |
| | |
| | | import unittest |
| | | from pyramid.compat import text_ |
| | | from pyramid.compat import native_ |
| | | from pyramid.compat import ( |
| | | text_, |
| | | native_, |
| | | ) |
| | | |
| | | class UrlEncodeTests(unittest.TestCase): |
| | | def _callFUT(self, query, doseq=False): |
| | |
| | | import unittest |
| | | |
| | | from pyramid.compat import bytes_ |
| | | from pyramid.compat import text_ |
| | | from pyramid.compat import ( |
| | | bytes_, |
| | | text_, |
| | | ) |
| | | |
| | | class Test_exception_response(unittest.TestCase): |
| | | def _callFUT(self, *arg, **kw): |
| | |
| | | from pyramid.wsgi import wsgiapp |
| | | from pyramid.view import view_config |
| | | from pyramid.static import static_view |
| | | from pyramid.compat import text_ |
| | | from pyramid.compat import url_quote |
| | | from pyramid.compat import ( |
| | | text_, |
| | | url_quote, |
| | | ) |
| | | |
| | | from zope.interface import Interface |
| | | |
| | |
| | | return val |
| | | |
| | | def _assertBody(body, filename): |
| | | if defaultlocale is None: |
| | | if defaultlocale is None: # pragma: no cover |
| | | # If system locale does not have an encoding then default to utf-8 |
| | | filename = filename.encode('utf-8') |
| | | assert(body.replace(b'\r', b'') == read_(filename)) |
| | |
| | | |
| | | import unittest |
| | | from pyramid import testing |
| | | from pyramid.compat import text_ |
| | | from pyramid.compat import text_type |
| | | from pyramid.compat import ( |
| | | text_, |
| | | text_type, |
| | | ) |
| | | |
| | | class Base(object): |
| | | def setUp(self): |
| | |
| | | import unittest |
| | | from pyramid import testing |
| | | |
| | | from pyramid.compat import PY3 |
| | | from pyramid.compat import text_ |
| | | from pyramid.compat import bytes_ |
| | | from pyramid.compat import native_ |
| | | from pyramid.compat import iteritems_, iterkeys_, itervalues_ |
| | | from pyramid.compat import ( |
| | | PY3, |
| | | text_, |
| | | bytes_, |
| | | native_, |
| | | iteritems_, |
| | | iterkeys_, |
| | | itervalues_, |
| | | ) |
| | | |
| | | class TestRequest(unittest.TestCase): |
| | | def setUp(self): |
| | |
| | | import unittest |
| | | import warnings |
| | | |
| | | from pyramid.testing import setUp |
| | | from pyramid.testing import tearDown |
| | | from pyramid.compat import text_ |
| | | from pyramid.compat import native_ |
| | | from pyramid.testing import ( |
| | | setUp, |
| | | tearDown, |
| | | ) |
| | | from pyramid.compat import ( |
| | | text_, |
| | | native_, |
| | | ) |
| | | |
| | | class TestURLMethodsMixin(unittest.TestCase): |
| | | def setUp(self): |
| | |
| | | |
| | | from zope.interface import implementer |
| | | |
| | | from pyramid.testing import setUp |
| | | from pyramid.testing import tearDown |
| | | from pyramid.testing import ( |
| | | setUp, |
| | | tearDown, |
| | | ) |
| | | |
| | | class BaseTest(object): |
| | | def setUp(self): |