summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.coveragerc15
-rw-r--r--HACKING.txt14
-rw-r--r--MANIFEST.in6
-rw-r--r--RELEASING.txt17
-rw-r--r--appveyor.yml2
-rwxr-xr-xbuilddocs.sh3
-rwxr-xr-xcoverage.sh3
-rw-r--r--pyramid/tests/fixtures/dummy.ini4
-rw-r--r--pyramid/tests/pkgs/static_assetspec/__init__.py3
-rw-r--r--pyramid/tests/pkgs/static_routeprefix/__init__.py7
-rw-r--r--pyramid/tests/pkgs/viewdecoratorapp/__init__.py3
-rwxr-xr-xscaffoldtests.sh2
-rw-r--r--setup.cfg8
-rw-r--r--setup.py5
-rw-r--r--src/pyramid/__init__.py (renamed from pyramid/__init__.py)0
-rw-r--r--src/pyramid/asset.py (renamed from pyramid/asset.py)0
-rw-r--r--src/pyramid/authentication.py (renamed from pyramid/authentication.py)0
-rw-r--r--src/pyramid/authorization.py (renamed from pyramid/authorization.py)0
-rw-r--r--src/pyramid/compat.py (renamed from pyramid/compat.py)0
-rw-r--r--src/pyramid/config/__init__.py (renamed from pyramid/config/__init__.py)0
-rw-r--r--src/pyramid/config/adapters.py (renamed from pyramid/config/adapters.py)0
-rw-r--r--src/pyramid/config/assets.py (renamed from pyramid/config/assets.py)0
-rw-r--r--src/pyramid/config/factories.py (renamed from pyramid/config/factories.py)0
-rw-r--r--src/pyramid/config/i18n.py (renamed from pyramid/config/i18n.py)0
-rw-r--r--src/pyramid/config/predicates.py (renamed from pyramid/config/predicates.py)0
-rw-r--r--src/pyramid/config/rendering.py (renamed from pyramid/config/rendering.py)0
-rw-r--r--src/pyramid/config/routes.py (renamed from pyramid/config/routes.py)0
-rw-r--r--src/pyramid/config/security.py (renamed from pyramid/config/security.py)0
-rw-r--r--src/pyramid/config/settings.py (renamed from pyramid/config/settings.py)0
-rw-r--r--src/pyramid/config/testing.py (renamed from pyramid/config/testing.py)0
-rw-r--r--src/pyramid/config/tweens.py (renamed from pyramid/config/tweens.py)0
-rw-r--r--src/pyramid/config/util.py (renamed from pyramid/config/util.py)0
-rw-r--r--src/pyramid/config/views.py (renamed from pyramid/config/views.py)0
-rw-r--r--src/pyramid/config/zca.py (renamed from pyramid/config/zca.py)0
-rw-r--r--src/pyramid/csrf.py (renamed from pyramid/csrf.py)0
-rw-r--r--src/pyramid/decorator.py (renamed from pyramid/decorator.py)0
-rw-r--r--src/pyramid/encode.py (renamed from pyramid/encode.py)0
-rw-r--r--src/pyramid/events.py (renamed from pyramid/events.py)0
-rw-r--r--src/pyramid/exceptions.py (renamed from pyramid/exceptions.py)0
-rw-r--r--src/pyramid/httpexceptions.py (renamed from pyramid/httpexceptions.py)0
-rw-r--r--src/pyramid/i18n.py (renamed from pyramid/i18n.py)0
-rw-r--r--src/pyramid/interfaces.py (renamed from pyramid/interfaces.py)0
-rw-r--r--src/pyramid/location.py (renamed from pyramid/location.py)0
-rw-r--r--src/pyramid/paster.py (renamed from pyramid/paster.py)0
-rw-r--r--src/pyramid/path.py (renamed from pyramid/path.py)0
-rw-r--r--src/pyramid/predicates.py (renamed from pyramid/predicates.py)0
-rw-r--r--src/pyramid/registry.py (renamed from pyramid/registry.py)0
-rw-r--r--src/pyramid/renderers.py (renamed from pyramid/renderers.py)0
-rw-r--r--src/pyramid/request.py (renamed from pyramid/request.py)0
-rw-r--r--src/pyramid/resource.py (renamed from pyramid/resource.py)0
-rw-r--r--src/pyramid/response.py (renamed from pyramid/response.py)0
-rw-r--r--src/pyramid/router.py (renamed from pyramid/router.py)0
-rw-r--r--src/pyramid/scaffolds/__init__.py (renamed from pyramid/scaffolds/__init__.py)0
-rw-r--r--src/pyramid/scaffolds/alchemy/+dot+coveragerc_tmpl (renamed from pyramid/scaffolds/alchemy/+dot+coveragerc_tmpl)0
-rw-r--r--src/pyramid/scaffolds/alchemy/+package+/__init__.py (renamed from pyramid/scaffolds/alchemy/+package+/__init__.py)0
-rw-r--r--src/pyramid/scaffolds/alchemy/+package+/models/__init__.py_tmpl (renamed from pyramid/scaffolds/alchemy/+package+/models/__init__.py_tmpl)0
-rw-r--r--src/pyramid/scaffolds/alchemy/+package+/models/meta.py (renamed from pyramid/scaffolds/alchemy/+package+/models/meta.py)0
-rw-r--r--src/pyramid/scaffolds/alchemy/+package+/models/mymodel.py (renamed from pyramid/scaffolds/alchemy/+package+/models/mymodel.py)0
-rw-r--r--src/pyramid/scaffolds/alchemy/+package+/routes.py (renamed from pyramid/scaffolds/alchemy/+package+/routes.py)0
-rw-r--r--src/pyramid/scaffolds/alchemy/+package+/scripts/__init__.py (renamed from pyramid/scaffolds/alchemy/+package+/scripts/__init__.py)0
-rw-r--r--src/pyramid/scaffolds/alchemy/+package+/scripts/initializedb.py (renamed from pyramid/scaffolds/alchemy/+package+/scripts/initializedb.py)0
-rw-r--r--src/pyramid/scaffolds/alchemy/+package+/static/pyramid-16x16.png (renamed from pyramid/scaffolds/alchemy/+package+/static/pyramid-16x16.png)bin1319 -> 1319 bytes
-rw-r--r--src/pyramid/scaffolds/alchemy/+package+/static/pyramid.png (renamed from pyramid/scaffolds/alchemy/+package+/static/pyramid.png)bin12901 -> 12901 bytes
-rw-r--r--src/pyramid/scaffolds/alchemy/+package+/static/theme.css (renamed from pyramid/scaffolds/alchemy/+package+/static/theme.css)0
-rw-r--r--src/pyramid/scaffolds/alchemy/+package+/templates/404.jinja2_tmpl (renamed from pyramid/scaffolds/alchemy/+package+/templates/404.jinja2_tmpl)0
-rw-r--r--src/pyramid/scaffolds/alchemy/+package+/templates/layout.jinja2_tmpl (renamed from pyramid/scaffolds/alchemy/+package+/templates/layout.jinja2_tmpl)0
-rw-r--r--src/pyramid/scaffolds/alchemy/+package+/templates/mytemplate.jinja2_tmpl (renamed from pyramid/scaffolds/alchemy/+package+/templates/mytemplate.jinja2_tmpl)0
-rw-r--r--src/pyramid/scaffolds/alchemy/+package+/tests.py_tmpl (renamed from pyramid/scaffolds/alchemy/+package+/tests.py_tmpl)0
-rw-r--r--src/pyramid/scaffolds/alchemy/+package+/views/__init__.py (renamed from pyramid/scaffolds/alchemy/+package+/views/__init__.py)0
-rw-r--r--src/pyramid/scaffolds/alchemy/+package+/views/default.py_tmpl (renamed from pyramid/scaffolds/alchemy/+package+/views/default.py_tmpl)0
-rw-r--r--src/pyramid/scaffolds/alchemy/+package+/views/notfound.py_tmpl (renamed from pyramid/scaffolds/alchemy/+package+/views/notfound.py_tmpl)0
-rw-r--r--src/pyramid/scaffolds/alchemy/CHANGES.txt_tmpl (renamed from pyramid/scaffolds/alchemy/CHANGES.txt_tmpl)0
-rw-r--r--src/pyramid/scaffolds/alchemy/MANIFEST.in_tmpl (renamed from pyramid/scaffolds/alchemy/MANIFEST.in_tmpl)0
-rw-r--r--src/pyramid/scaffolds/alchemy/README.txt_tmpl (renamed from pyramid/scaffolds/alchemy/README.txt_tmpl)0
-rw-r--r--src/pyramid/scaffolds/alchemy/development.ini_tmpl (renamed from pyramid/scaffolds/alchemy/development.ini_tmpl)0
-rw-r--r--src/pyramid/scaffolds/alchemy/production.ini_tmpl (renamed from pyramid/scaffolds/alchemy/production.ini_tmpl)0
-rw-r--r--src/pyramid/scaffolds/alchemy/pytest.ini_tmpl (renamed from pyramid/scaffolds/alchemy/pytest.ini_tmpl)0
-rw-r--r--src/pyramid/scaffolds/alchemy/setup.py_tmpl (renamed from pyramid/scaffolds/alchemy/setup.py_tmpl)0
-rw-r--r--src/pyramid/scaffolds/copydir.py (renamed from pyramid/scaffolds/copydir.py)0
-rw-r--r--src/pyramid/scaffolds/starter/+dot+coveragerc_tmpl (renamed from pyramid/scaffolds/starter/+dot+coveragerc_tmpl)0
-rw-r--r--src/pyramid/scaffolds/starter/+package+/__init__.py (renamed from pyramid/scaffolds/starter/+package+/__init__.py)0
-rw-r--r--src/pyramid/scaffolds/starter/+package+/static/pyramid-16x16.png (renamed from pyramid/scaffolds/starter/+package+/static/pyramid-16x16.png)bin1319 -> 1319 bytes
-rw-r--r--src/pyramid/scaffolds/starter/+package+/static/pyramid.png (renamed from pyramid/scaffolds/starter/+package+/static/pyramid.png)bin12901 -> 12901 bytes
-rw-r--r--src/pyramid/scaffolds/starter/+package+/static/theme.css (renamed from pyramid/scaffolds/starter/+package+/static/theme.css)0
-rw-r--r--src/pyramid/scaffolds/starter/+package+/templates/layout.jinja2_tmpl (renamed from pyramid/scaffolds/starter/+package+/templates/layout.jinja2_tmpl)0
-rw-r--r--src/pyramid/scaffolds/starter/+package+/templates/mytemplate.jinja2_tmpl (renamed from pyramid/scaffolds/starter/+package+/templates/mytemplate.jinja2_tmpl)0
-rw-r--r--src/pyramid/scaffolds/starter/+package+/tests.py_tmpl (renamed from pyramid/scaffolds/starter/+package+/tests.py_tmpl)0
-rw-r--r--src/pyramid/scaffolds/starter/+package+/views.py_tmpl (renamed from pyramid/scaffolds/starter/+package+/views.py_tmpl)0
-rw-r--r--src/pyramid/scaffolds/starter/CHANGES.txt_tmpl (renamed from pyramid/scaffolds/starter/CHANGES.txt_tmpl)0
-rw-r--r--src/pyramid/scaffolds/starter/MANIFEST.in_tmpl (renamed from pyramid/scaffolds/starter/MANIFEST.in_tmpl)0
-rw-r--r--src/pyramid/scaffolds/starter/README.txt_tmpl (renamed from pyramid/scaffolds/starter/README.txt_tmpl)0
-rw-r--r--src/pyramid/scaffolds/starter/development.ini_tmpl (renamed from pyramid/scaffolds/starter/development.ini_tmpl)0
-rw-r--r--src/pyramid/scaffolds/starter/production.ini_tmpl (renamed from pyramid/scaffolds/starter/production.ini_tmpl)0
-rw-r--r--src/pyramid/scaffolds/starter/pytest.ini_tmpl (renamed from pyramid/scaffolds/starter/pytest.ini_tmpl)0
-rw-r--r--src/pyramid/scaffolds/starter/setup.py_tmpl (renamed from pyramid/scaffolds/starter/setup.py_tmpl)0
-rw-r--r--src/pyramid/scaffolds/template.py (renamed from pyramid/scaffolds/template.py)0
-rw-r--r--src/pyramid/scaffolds/tests.py (renamed from pyramid/scaffolds/tests.py)0
-rw-r--r--src/pyramid/scaffolds/zodb/+dot+coveragerc_tmpl (renamed from pyramid/scaffolds/zodb/+dot+coveragerc_tmpl)0
-rw-r--r--src/pyramid/scaffolds/zodb/+package+/__init__.py (renamed from pyramid/scaffolds/zodb/+package+/__init__.py)0
-rw-r--r--src/pyramid/scaffolds/zodb/+package+/models.py (renamed from pyramid/scaffolds/zodb/+package+/models.py)0
-rw-r--r--src/pyramid/scaffolds/zodb/+package+/static/pyramid-16x16.png (renamed from pyramid/scaffolds/zodb/+package+/static/pyramid-16x16.png)bin1319 -> 1319 bytes
-rw-r--r--src/pyramid/scaffolds/zodb/+package+/static/pyramid.png (renamed from pyramid/scaffolds/zodb/+package+/static/pyramid.png)bin12901 -> 12901 bytes
-rw-r--r--src/pyramid/scaffolds/zodb/+package+/static/theme.css (renamed from pyramid/scaffolds/zodb/+package+/static/theme.css)0
-rw-r--r--src/pyramid/scaffolds/zodb/+package+/templates/mytemplate.pt_tmpl (renamed from pyramid/scaffolds/zodb/+package+/templates/mytemplate.pt_tmpl)0
-rw-r--r--src/pyramid/scaffolds/zodb/+package+/tests.py_tmpl (renamed from pyramid/scaffolds/zodb/+package+/tests.py_tmpl)0
-rw-r--r--src/pyramid/scaffolds/zodb/+package+/views.py_tmpl (renamed from pyramid/scaffolds/zodb/+package+/views.py_tmpl)0
-rw-r--r--src/pyramid/scaffolds/zodb/CHANGES.txt_tmpl (renamed from pyramid/scaffolds/zodb/CHANGES.txt_tmpl)0
-rw-r--r--src/pyramid/scaffolds/zodb/MANIFEST.in_tmpl (renamed from pyramid/scaffolds/zodb/MANIFEST.in_tmpl)0
-rw-r--r--src/pyramid/scaffolds/zodb/README.txt_tmpl (renamed from pyramid/scaffolds/zodb/README.txt_tmpl)0
-rw-r--r--src/pyramid/scaffolds/zodb/development.ini_tmpl (renamed from pyramid/scaffolds/zodb/development.ini_tmpl)0
-rw-r--r--src/pyramid/scaffolds/zodb/production.ini_tmpl (renamed from pyramid/scaffolds/zodb/production.ini_tmpl)0
-rw-r--r--src/pyramid/scaffolds/zodb/pytest.ini_tmpl (renamed from pyramid/scaffolds/zodb/pytest.ini_tmpl)0
-rw-r--r--src/pyramid/scaffolds/zodb/setup.py_tmpl (renamed from pyramid/scaffolds/zodb/setup.py_tmpl)0
-rw-r--r--src/pyramid/scripting.py (renamed from pyramid/scripting.py)0
-rw-r--r--src/pyramid/scripts/__init__.py (renamed from pyramid/scripts/__init__.py)0
-rw-r--r--src/pyramid/scripts/common.py (renamed from pyramid/scripts/common.py)0
-rw-r--r--src/pyramid/scripts/pcreate.py (renamed from pyramid/scripts/pcreate.py)0
-rw-r--r--src/pyramid/scripts/pdistreport.py (renamed from pyramid/scripts/pdistreport.py)0
-rw-r--r--src/pyramid/scripts/prequest.py (renamed from pyramid/scripts/prequest.py)0
-rw-r--r--src/pyramid/scripts/proutes.py (renamed from pyramid/scripts/proutes.py)0
-rw-r--r--src/pyramid/scripts/pserve.py (renamed from pyramid/scripts/pserve.py)0
-rw-r--r--src/pyramid/scripts/pshell.py (renamed from pyramid/scripts/pshell.py)0
-rw-r--r--src/pyramid/scripts/ptweens.py (renamed from pyramid/scripts/ptweens.py)0
-rw-r--r--src/pyramid/scripts/pviews.py (renamed from pyramid/scripts/pviews.py)0
-rw-r--r--src/pyramid/security.py (renamed from pyramid/security.py)0
-rw-r--r--src/pyramid/session.py (renamed from pyramid/session.py)0
-rw-r--r--src/pyramid/settings.py (renamed from pyramid/settings.py)0
-rw-r--r--src/pyramid/static.py (renamed from pyramid/static.py)0
-rw-r--r--src/pyramid/testing.py (renamed from pyramid/testing.py)0
-rw-r--r--src/pyramid/threadlocal.py (renamed from pyramid/threadlocal.py)0
-rw-r--r--src/pyramid/traversal.py (renamed from pyramid/traversal.py)0
-rw-r--r--src/pyramid/tweens.py (renamed from pyramid/tweens.py)0
-rw-r--r--src/pyramid/url.py (renamed from pyramid/url.py)0
-rw-r--r--src/pyramid/urldispatch.py (renamed from pyramid/urldispatch.py)0
-rw-r--r--src/pyramid/util.py (renamed from pyramid/util.py)0
-rw-r--r--src/pyramid/view.py (renamed from pyramid/view.py)0
-rw-r--r--src/pyramid/viewderivers.py (renamed from pyramid/viewderivers.py)0
-rw-r--r--src/pyramid/wsgi.py (renamed from pyramid/wsgi.py)0
-rw-r--r--tests/__init__.py (renamed from pyramid/tests/__init__.py)0
-rw-r--r--tests/fixtures/dummy.ini4
-rw-r--r--tests/fixtures/manifest.json (renamed from pyramid/tests/fixtures/manifest.json)0
-rw-r--r--tests/fixtures/manifest2.json (renamed from pyramid/tests/fixtures/manifest2.json)0
-rw-r--r--tests/fixtures/minimal.jpg (renamed from pyramid/tests/fixtures/minimal.jpg)bin631 -> 631 bytes
-rwxr-xr-xtests/fixtures/minimal.pdf (renamed from pyramid/tests/fixtures/minimal.pdf)bin1054 -> 1054 bytes
-rw-r--r--tests/fixtures/minimal.txt (renamed from pyramid/tests/fixtures/minimal.txt)0
-rw-r--r--tests/fixtures/minimal.xml (renamed from pyramid/tests/fixtures/minimal.xml)0
-rw-r--r--tests/fixtures/nonminimal.txt (renamed from pyramid/tests/fixtures/nonminimal.txt)0
-rw-r--r--tests/fixtures/static/.hiddenfile (renamed from pyramid/tests/fixtures/static/.hiddenfile)0
-rw-r--r--tests/fixtures/static/arcs.svg.tgz (renamed from pyramid/tests/fixtures/static/arcs.svg.tgz)0
-rw-r--r--tests/fixtures/static/index.html (renamed from pyramid/tests/fixtures/static/index.html)0
-rw-r--r--tests/fixtures/static/subdir/index.html (renamed from pyramid/tests/fixtures/static/subdir/index.html)0
-rw-r--r--tests/pkgs/__init__.py (renamed from pyramid/tests/pkgs/__init__.py)0
-rw-r--r--tests/pkgs/ccbugapp/__init__.py (renamed from pyramid/tests/pkgs/ccbugapp/__init__.py)0
-rw-r--r--tests/pkgs/conflictapp/__init__.py (renamed from pyramid/tests/pkgs/conflictapp/__init__.py)2
-rw-r--r--tests/pkgs/conflictapp/included.py (renamed from pyramid/tests/pkgs/conflictapp/included.py)0
-rw-r--r--tests/pkgs/defpermbugapp/__init__.py (renamed from pyramid/tests/pkgs/defpermbugapp/__init__.py)2
-rw-r--r--tests/pkgs/eventonly/__init__.py (renamed from pyramid/tests/pkgs/eventonly/__init__.py)2
-rw-r--r--tests/pkgs/exceptionviewapp/__init__.py (renamed from pyramid/tests/pkgs/exceptionviewapp/__init__.py)0
-rw-r--r--tests/pkgs/exceptionviewapp/models.py (renamed from pyramid/tests/pkgs/exceptionviewapp/models.py)0
-rw-r--r--tests/pkgs/exceptionviewapp/views.py (renamed from pyramid/tests/pkgs/exceptionviewapp/views.py)0
-rw-r--r--tests/pkgs/fixtureapp/__init__.py (renamed from pyramid/tests/pkgs/fixtureapp/__init__.py)0
-rw-r--r--tests/pkgs/fixtureapp/models.py (renamed from pyramid/tests/pkgs/fixtureapp/models.py)0
-rw-r--r--tests/pkgs/fixtureapp/subpackage/__init__.py (renamed from pyramid/tests/pkgs/fixtureapp/subpackage/__init__.py)0
-rw-r--r--tests/pkgs/fixtureapp/views.py (renamed from pyramid/tests/pkgs/fixtureapp/views.py)0
-rw-r--r--tests/pkgs/forbiddenapp/__init__.py (renamed from pyramid/tests/pkgs/forbiddenapp/__init__.py)0
-rw-r--r--tests/pkgs/forbiddenview/__init__.py (renamed from pyramid/tests/pkgs/forbiddenview/__init__.py)2
-rw-r--r--tests/pkgs/hybridapp/__init__.py (renamed from pyramid/tests/pkgs/hybridapp/__init__.py)0
-rw-r--r--tests/pkgs/hybridapp/views.py (renamed from pyramid/tests/pkgs/hybridapp/views.py)0
-rw-r--r--tests/pkgs/includeapp1/__init__.py (renamed from pyramid/tests/pkgs/includeapp1/__init__.py)0
-rw-r--r--tests/pkgs/includeapp1/root.py (renamed from pyramid/tests/pkgs/includeapp1/root.py)2
-rw-r--r--tests/pkgs/includeapp1/three.py (renamed from pyramid/tests/pkgs/includeapp1/three.py)2
-rw-r--r--tests/pkgs/includeapp1/two.py (renamed from pyramid/tests/pkgs/includeapp1/two.py)2
-rw-r--r--tests/pkgs/localeapp/__init__.py (renamed from pyramid/tests/pkgs/localeapp/__init__.py)0
-rw-r--r--tests/pkgs/localeapp/locale/GARBAGE (renamed from pyramid/tests/pkgs/localeapp/locale/GARBAGE)0
-rw-r--r--tests/pkgs/localeapp/locale/be/LC_MESSAGES (renamed from pyramid/tests/pkgs/localeapp/locale/be/LC_MESSAGES)0
-rw-r--r--tests/pkgs/localeapp/locale/de/LC_MESSAGES/deformsite.mo (renamed from pyramid/tests/pkgs/localeapp/locale/de/LC_MESSAGES/deformsite.mo)bin543 -> 543 bytes
-rw-r--r--tests/pkgs/localeapp/locale/de/LC_MESSAGES/deformsite.po (renamed from pyramid/tests/pkgs/localeapp/locale/de/LC_MESSAGES/deformsite.po)0
-rw-r--r--tests/pkgs/localeapp/locale/de_DE/LC_MESSAGES/deformsite.mo (renamed from pyramid/tests/pkgs/localeapp/locale/de_DE/LC_MESSAGES/deformsite.mo)bin531 -> 531 bytes
-rw-r--r--tests/pkgs/localeapp/locale/de_DE/LC_MESSAGES/deformsite.po (renamed from pyramid/tests/pkgs/localeapp/locale/de_DE/LC_MESSAGES/deformsite.po)0
-rw-r--r--tests/pkgs/localeapp/locale/en/LC_MESSAGES/deformsite.mo (renamed from pyramid/tests/pkgs/localeapp/locale/en/LC_MESSAGES/deformsite.mo)bin543 -> 543 bytes
-rw-r--r--tests/pkgs/localeapp/locale/en/LC_MESSAGES/deformsite.po (renamed from pyramid/tests/pkgs/localeapp/locale/en/LC_MESSAGES/deformsite.po)0
-rw-r--r--tests/pkgs/localeapp/locale2/GARBAGE (renamed from pyramid/tests/pkgs/localeapp/locale2/GARBAGE)0
-rw-r--r--tests/pkgs/localeapp/locale2/be/LC_MESSAGES (renamed from pyramid/tests/pkgs/localeapp/locale2/be/LC_MESSAGES)0
-rw-r--r--tests/pkgs/localeapp/locale2/de/LC_MESSAGES/deformsite.mo (renamed from pyramid/tests/pkgs/localeapp/locale2/de/LC_MESSAGES/deformsite.mo)bin543 -> 543 bytes
-rw-r--r--tests/pkgs/localeapp/locale2/de/LC_MESSAGES/deformsite.po (renamed from pyramid/tests/pkgs/localeapp/locale2/de/LC_MESSAGES/deformsite.po)0
-rw-r--r--tests/pkgs/localeapp/locale2/en/LC_MESSAGES/deformsite.mo (renamed from pyramid/tests/pkgs/localeapp/locale2/en/LC_MESSAGES/deformsite.mo)bin543 -> 543 bytes
-rw-r--r--tests/pkgs/localeapp/locale2/en/LC_MESSAGES/deformsite.po (renamed from pyramid/tests/pkgs/localeapp/locale2/en/LC_MESSAGES/deformsite.po)0
-rw-r--r--tests/pkgs/localeapp/locale3/GARBAGE (renamed from pyramid/tests/pkgs/localeapp/locale3/GARBAGE)0
-rw-r--r--tests/pkgs/localeapp/locale3/be/LC_MESSAGES (renamed from pyramid/tests/pkgs/localeapp/locale3/be/LC_MESSAGES)0
-rw-r--r--tests/pkgs/localeapp/locale3/de/LC_MESSAGES/deformsite.mo (renamed from pyramid/tests/pkgs/localeapp/locale3/de/LC_MESSAGES/deformsite.mo)bin543 -> 543 bytes
-rw-r--r--tests/pkgs/localeapp/locale3/de/LC_MESSAGES/deformsite.po (renamed from pyramid/tests/pkgs/localeapp/locale3/de/LC_MESSAGES/deformsite.po)0
-rw-r--r--tests/pkgs/localeapp/locale3/en/LC_MESSAGES/deformsite.mo (renamed from pyramid/tests/pkgs/localeapp/locale3/en/LC_MESSAGES/deformsite.mo)bin543 -> 543 bytes
-rw-r--r--tests/pkgs/localeapp/locale3/en/LC_MESSAGES/deformsite.po (renamed from pyramid/tests/pkgs/localeapp/locale3/en/LC_MESSAGES/deformsite.po)0
-rw-r--r--tests/pkgs/notfoundview/__init__.py (renamed from pyramid/tests/pkgs/notfoundview/__init__.py)2
-rw-r--r--tests/pkgs/permbugapp/__init__.py (renamed from pyramid/tests/pkgs/permbugapp/__init__.py)0
-rw-r--r--tests/pkgs/rendererscanapp/__init__.py (renamed from pyramid/tests/pkgs/rendererscanapp/__init__.py)0
-rw-r--r--tests/pkgs/rendererscanapp/two/__init__.py (renamed from pyramid/tests/pkgs/rendererscanapp/two/__init__.py)0
-rw-r--r--tests/pkgs/restbugapp/__init__.py (renamed from pyramid/tests/pkgs/restbugapp/__init__.py)0
-rw-r--r--tests/pkgs/restbugapp/views.py (renamed from pyramid/tests/pkgs/restbugapp/views.py)0
-rw-r--r--tests/pkgs/static_abspath/__init__.py (renamed from pyramid/tests/pkgs/static_abspath/__init__.py)0
-rw-r--r--tests/pkgs/static_assetspec/__init__.py3
-rw-r--r--tests/pkgs/static_routeprefix/__init__.py7
-rw-r--r--tests/pkgs/staticpermapp/__init__.py (renamed from pyramid/tests/pkgs/staticpermapp/__init__.py)6
-rw-r--r--tests/pkgs/subrequestapp/__init__.py (renamed from pyramid/tests/pkgs/subrequestapp/__init__.py)0
-rw-r--r--tests/pkgs/viewdecoratorapp/__init__.py3
-rw-r--r--tests/pkgs/viewdecoratorapp/views/__init__.py (renamed from pyramid/tests/pkgs/viewdecoratorapp/views/__init__.py)0
-rw-r--r--tests/pkgs/viewdecoratorapp/views/views.py (renamed from pyramid/tests/pkgs/viewdecoratorapp/views/views.py)0
-rw-r--r--tests/pkgs/wsgiapp2app/__init__.py (renamed from pyramid/tests/pkgs/wsgiapp2app/__init__.py)0
-rw-r--r--tests/test_asset.py (renamed from pyramid/tests/test_asset.py)20
-rw-r--r--tests/test_authentication.py (renamed from pyramid/tests/test_authentication.py)30
-rw-r--r--tests/test_authorization.py (renamed from pyramid/tests/test_authorization.py)0
-rw-r--r--tests/test_compat.py (renamed from pyramid/tests/test_compat.py)0
-rw-r--r--tests/test_config/__init__.py (renamed from pyramid/tests/test_config/__init__.py)0
-rw-r--r--tests/test_config/files/assets/dummy.txt (renamed from pyramid/tests/test_config/files/assets/dummy.txt)0
-rw-r--r--tests/test_config/files/minimal.txt (renamed from pyramid/tests/test_config/files/minimal.txt)0
-rw-r--r--tests/test_config/path/scanerror/__init__.py (renamed from pyramid/tests/test_config/path/scanerror/__init__.py)0
-rw-r--r--tests/test_config/path/scanerror/will_raise_error.py (renamed from pyramid/tests/test_config/path/scanerror/will_raise_error.py)0
-rw-r--r--tests/test_config/pkgs/__init__.py (renamed from pyramid/tests/test_config/pkgs/__init__.py)0
-rw-r--r--tests/test_config/pkgs/asset/__init__.py (renamed from pyramid/tests/test_config/pkgs/asset/__init__.py)0
-rw-r--r--tests/test_config/pkgs/asset/subpackage/__init__.py (renamed from pyramid/tests/test_config/pkgs/asset/subpackage/__init__.py)0
-rw-r--r--tests/test_config/pkgs/asset/subpackage/templates/bar.pt (renamed from pyramid/tests/test_config/pkgs/asset/subpackage/templates/bar.pt)0
-rw-r--r--tests/test_config/pkgs/scanextrakw/__init__.py (renamed from pyramid/tests/test_config/pkgs/scanextrakw/__init__.py)0
-rw-r--r--tests/test_config/pkgs/scannable/__init__.py (renamed from pyramid/tests/test_config/pkgs/scannable/__init__.py)0
-rw-r--r--tests/test_config/pkgs/scannable/another.py (renamed from pyramid/tests/test_config/pkgs/scannable/another.py)0
-rw-r--r--tests/test_config/pkgs/scannable/pod/notinit.py (renamed from pyramid/tests/test_config/pkgs/scannable/pod/notinit.py)0
-rw-r--r--tests/test_config/pkgs/scannable/subpackage/__init__.py (renamed from pyramid/tests/test_config/pkgs/scannable/subpackage/__init__.py)0
-rw-r--r--tests/test_config/pkgs/scannable/subpackage/notinit.py (renamed from pyramid/tests/test_config/pkgs/scannable/subpackage/notinit.py)0
-rw-r--r--tests/test_config/pkgs/scannable/subpackage/subsubpackage/__init__.py (renamed from pyramid/tests/test_config/pkgs/scannable/subpackage/subsubpackage/__init__.py)0
-rw-r--r--tests/test_config/pkgs/selfscan/__init__.py (renamed from pyramid/tests/test_config/pkgs/selfscan/__init__.py)0
-rw-r--r--tests/test_config/pkgs/selfscan/another.py (renamed from pyramid/tests/test_config/pkgs/selfscan/another.py)0
-rw-r--r--tests/test_config/test_adapters.py (renamed from pyramid/tests/test_config/test_adapters.py)18
-rw-r--r--tests/test_config/test_assets.py (renamed from pyramid/tests/test_config/test_assets.py)134
-rw-r--r--tests/test_config/test_factories.py (renamed from pyramid/tests/test_config/test_factories.py)10
-rw-r--r--tests/test_config/test_i18n.py (renamed from pyramid/tests/test_config/test_i18n.py)44
-rw-r--r--tests/test_config/test_init.py (renamed from pyramid/tests/test_config/test_init.py)169
-rw-r--r--tests/test_config/test_rendering.py (renamed from pyramid/tests/test_config/test_rendering.py)6
-rw-r--r--tests/test_config/test_routes.py (renamed from pyramid/tests/test_config/test_routes.py)6
-rw-r--r--tests/test_config/test_security.py (renamed from pyramid/tests/test_config/test_security.py)0
-rw-r--r--tests/test_config/test_settings.py (renamed from pyramid/tests/test_config/test_settings.py)0
-rw-r--r--tests/test_config/test_testing.py (renamed from pyramid/tests/test_config/test_testing.py)4
-rw-r--r--tests/test_config/test_tweens.py (renamed from pyramid/tests/test_config/test_tweens.py)46
-rw-r--r--tests/test_config/test_util.py (renamed from pyramid/tests/test_config/test_util.py)0
-rw-r--r--tests/test_config/test_views.py (renamed from pyramid/tests/test_config/test_views.py)60
-rw-r--r--tests/test_csrf.py (renamed from pyramid/tests/test_csrf.py)6
-rw-r--r--tests/test_decorator.py (renamed from pyramid/tests/test_decorator.py)0
-rw-r--r--tests/test_docs.py (renamed from pyramid/tests/test_docs.py)0
-rw-r--r--tests/test_encode.py (renamed from pyramid/tests/test_encode.py)0
-rw-r--r--tests/test_events.py (renamed from pyramid/tests/test_events.py)0
-rw-r--r--tests/test_exceptions.py (renamed from pyramid/tests/test_exceptions.py)0
-rw-r--r--tests/test_httpexceptions.py (renamed from pyramid/tests/test_httpexceptions.py)0
-rw-r--r--tests/test_i18n.py (renamed from pyramid/tests/test_i18n.py)0
-rw-r--r--tests/test_integration.py (renamed from pyramid/tests/test_integration.py)53
-rw-r--r--tests/test_location.py (renamed from pyramid/tests/test_location.py)0
-rw-r--r--tests/test_paster.py (renamed from pyramid/tests/test_paster.py)2
-rw-r--r--tests/test_path.py (renamed from pyramid/tests/test_path.py)161
-rw-r--r--tests/test_predicates.py (renamed from pyramid/tests/test_predicates.py)0
-rw-r--r--tests/test_registry.py (renamed from pyramid/tests/test_registry.py)2
-rw-r--r--tests/test_renderers.py (renamed from pyramid/tests/test_renderers.py)28
-rw-r--r--tests/test_request.py (renamed from pyramid/tests/test_request.py)0
-rw-r--r--tests/test_response.py (renamed from pyramid/tests/test_response.py)0
-rw-r--r--tests/test_router.py (renamed from pyramid/tests/test_router.py)0
-rw-r--r--tests/test_scaffolds/__init__.py (renamed from pyramid/tests/test_scaffolds/__init__.py)0
-rw-r--r--tests/test_scaffolds/fixture_scaffold/+package+/.badfile (renamed from pyramid/tests/test_scaffolds/fixture_scaffold/+package+/.badfile)0
-rw-r--r--tests/test_scaffolds/fixture_scaffold/+package+/__init__.py_tmpl (renamed from pyramid/tests/test_scaffolds/fixture_scaffold/+package+/__init__.py_tmpl)0
-rw-r--r--tests/test_scaffolds/fixture_scaffold/+package+/resources.py (renamed from pyramid/tests/test_scaffolds/fixture_scaffold/+package+/resources.py)0
-rw-r--r--tests/test_scaffolds/fixture_scaffold/+package+/static/favicon.ico (renamed from pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/favicon.ico)bin1406 -> 1406 bytes
-rw-r--r--tests/test_scaffolds/fixture_scaffold/+package+/static/footerbg.png (renamed from pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/footerbg.png)bin333 -> 333 bytes
-rw-r--r--tests/test_scaffolds/fixture_scaffold/+package+/static/headerbg.png (renamed from pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/headerbg.png)bin203 -> 203 bytes
-rw-r--r--tests/test_scaffolds/fixture_scaffold/+package+/static/ie6.css (renamed from pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/ie6.css)0
-rw-r--r--tests/test_scaffolds/fixture_scaffold/+package+/static/middlebg.png (renamed from pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/middlebg.png)bin2797 -> 2797 bytes
-rw-r--r--tests/test_scaffolds/fixture_scaffold/+package+/static/pylons.css (renamed from pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/pylons.css)0
-rw-r--r--tests/test_scaffolds/fixture_scaffold/+package+/static/pyramid-small.png (renamed from pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/pyramid-small.png)bin7044 -> 7044 bytes
-rw-r--r--tests/test_scaffolds/fixture_scaffold/+package+/static/pyramid.png (renamed from pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/pyramid.png)bin33055 -> 33055 bytes
-rw-r--r--tests/test_scaffolds/fixture_scaffold/+package+/static/transparent.gif (renamed from pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/transparent.gif)bin49 -> 49 bytes
-rw-r--r--tests/test_scaffolds/fixture_scaffold/+package+/templates/mytemplate.pt_tmpl (renamed from pyramid/tests/test_scaffolds/fixture_scaffold/+package+/templates/mytemplate.pt_tmpl)0
-rw-r--r--tests/test_scaffolds/fixture_scaffold/+package+/test_no_content.py_tmpl (renamed from pyramid/tests/test_scaffolds/fixture_scaffold/+package+/test_no_content.py_tmpl)0
-rw-r--r--tests/test_scaffolds/fixture_scaffold/+package+/tests.py_tmpl (renamed from pyramid/tests/test_scaffolds/fixture_scaffold/+package+/tests.py_tmpl)0
-rw-r--r--tests/test_scaffolds/fixture_scaffold/+package+/views.py_tmpl (renamed from pyramid/tests/test_scaffolds/fixture_scaffold/+package+/views.py_tmpl)0
-rw-r--r--tests/test_scaffolds/fixture_scaffold/CHANGES.txt_tmpl (renamed from pyramid/tests/test_scaffolds/fixture_scaffold/CHANGES.txt_tmpl)0
-rw-r--r--tests/test_scaffolds/fixture_scaffold/MANIFEST.in_tmpl (renamed from pyramid/tests/test_scaffolds/fixture_scaffold/MANIFEST.in_tmpl)0
-rw-r--r--tests/test_scaffolds/fixture_scaffold/README.txt_tmpl (renamed from pyramid/tests/test_scaffolds/fixture_scaffold/README.txt_tmpl)0
-rw-r--r--tests/test_scaffolds/fixture_scaffold/development.ini_tmpl (renamed from pyramid/tests/test_scaffolds/fixture_scaffold/development.ini_tmpl)0
-rw-r--r--tests/test_scaffolds/fixture_scaffold/production.ini_tmpl (renamed from pyramid/tests/test_scaffolds/fixture_scaffold/production.ini_tmpl)0
-rw-r--r--tests/test_scaffolds/fixture_scaffold/setup.py_tmpl (renamed from pyramid/tests/test_scaffolds/fixture_scaffold/setup.py_tmpl)0
-rw-r--r--tests/test_scaffolds/test_copydir.py (renamed from pyramid/tests/test_scaffolds/test_copydir.py)9
-rw-r--r--tests/test_scaffolds/test_init.py (renamed from pyramid/tests/test_scaffolds/test_init.py)0
-rw-r--r--tests/test_scaffolds/test_template.py (renamed from pyramid/tests/test_scaffolds/test_template.py)0
-rw-r--r--tests/test_scripting.py (renamed from pyramid/tests/test_scripting.py)0
-rw-r--r--tests/test_scripts/__init__.py (renamed from pyramid/tests/test_scripts/__init__.py)0
-rw-r--r--tests/test_scripts/dummy.py (renamed from pyramid/tests/test_scripts/dummy.py)0
-rw-r--r--tests/test_scripts/pystartup.txt (renamed from pyramid/tests/test_scripts/pystartup.txt)0
-rw-r--r--tests/test_scripts/test_common.py (renamed from pyramid/tests/test_scripts/test_common.py)0
-rw-r--r--tests/test_scripts/test_pcreate.py (renamed from pyramid/tests/test_scripts/test_pcreate.py)0
-rw-r--r--tests/test_scripts/test_pdistreport.py (renamed from pyramid/tests/test_scripts/test_pdistreport.py)0
-rw-r--r--tests/test_scripts/test_prequest.py (renamed from pyramid/tests/test_scripts/test_prequest.py)2
-rw-r--r--tests/test_scripts/test_proutes.py (renamed from pyramid/tests/test_scripts/test_proutes.py)28
-rw-r--r--tests/test_scripts/test_pserve.py (renamed from pyramid/tests/test_scripts/test_pserve.py)4
-rw-r--r--tests/test_scripts/test_pshell.py (renamed from pyramid/tests/test_scripts/test_pshell.py)2
-rw-r--r--tests/test_scripts/test_ptweens.py (renamed from pyramid/tests/test_scripts/test_ptweens.py)2
-rw-r--r--tests/test_scripts/test_pviews.py (renamed from pyramid/tests/test_scripts/test_pviews.py)24
-rw-r--r--tests/test_security.py (renamed from pyramid/tests/test_security.py)0
-rw-r--r--tests/test_session.py (renamed from pyramid/tests/test_session.py)2
-rw-r--r--tests/test_settings.py (renamed from pyramid/tests/test_settings.py)0
-rw-r--r--tests/test_static.py (renamed from pyramid/tests/test_static.py)64
-rw-r--r--tests/test_testing.py (renamed from pyramid/tests/test_testing.py)2
-rw-r--r--tests/test_threadlocal.py (renamed from pyramid/tests/test_threadlocal.py)0
-rw-r--r--tests/test_traversal.py (renamed from pyramid/tests/test_traversal.py)0
-rw-r--r--tests/test_tweens.py (renamed from pyramid/tests/test_tweens.py)0
-rw-r--r--tests/test_url.py (renamed from pyramid/tests/test_url.py)22
-rw-r--r--tests/test_urldispatch.py (renamed from pyramid/tests/test_urldispatch.py)0
-rw-r--r--tests/test_util.py (renamed from pyramid/tests/test_util.py)14
-rw-r--r--tests/test_view.py (renamed from pyramid/tests/test_view.py)14
-rw-r--r--tests/test_viewderivers.py (renamed from pyramid/tests/test_viewderivers.py)10
-rw-r--r--tests/test_wsgi.py (renamed from pyramid/tests/test_wsgi.py)0
-rw-r--r--tox.ini26
315 files changed, 587 insertions, 568 deletions
diff --git a/.coveragerc b/.coveragerc
new file mode 100644
index 000000000..b02940260
--- /dev/null
+++ b/.coveragerc
@@ -0,0 +1,15 @@
+[run]
+source =
+ pyramid
+ tests
+omit =
+ src/pyramid/scaffolds/tests.py
+
+[paths]
+source =
+ src/pyramid
+ */site-packages/pyramid
+
+[report]
+show_missing = true
+precision = 2
diff --git a/HACKING.txt b/HACKING.txt
index 132511e11..032d98f30 100644
--- a/HACKING.txt
+++ b/HACKING.txt
@@ -209,19 +209,14 @@ Running Tests
dependencies, start a server, and hit a URL on the server, can be run like
so:
- $ ./scaffoldtests.sh
-
- Alternatively:
-
- $ tox -e{py27,py34,py35,pyt36,py37,pypy}-scaffolds
+ $ tox -e{py27,py34,py35,py36,py37,pypy}-scaffolds
Test Coverage
-------------
- The codebase *must* have 100% test statement coverage after each commit. You
- can test coverage via `./coverage.sh` (which itself just executes `tox
- -epy2-cover,py3-cover,coverage`).
+ can test coverage via `tox -epy2-cover,py3-cover,coverage`.
Documentation Coverage and Building HTML Documentation
@@ -232,10 +227,9 @@ documentation in this package which references that API or behavior must be
changed to reflect the bug fix, ideally in the same commit that fixes the bug
or adds the feature. To build and review docs, use the following steps.
-1. In the main Pyramid checkout directory, run `./builddocs.sh` (which just
- turns around and runs `tox -e docs`):
+1. In the main Pyramid checkout directory, run `tox -e docs`:
- $ ./builddocs.sh
+ $ tox -e docs
2. Open the `docs/_build/html/index.html` file to see the resulting HTML
rendering.
diff --git a/MANIFEST.in b/MANIFEST.in
index c3391cbcc..94da9d899 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,17 +1,17 @@
-graft pyramid
+graft src/pyramid
graft docs
prune docs/_build
+graft tests
include README.rst
include CHANGES.rst HISTORY.rst BFG_HISTORY.rst
include CONTRIBUTORS.txt LICENSE.txt COPYRIGHT.txt
include contributing.md RELEASING.txt
-include tox.ini appveyor.yml .travis.yml rtd.txt
+include .coveragerc tox.ini appveyor.yml .travis.yml rtd.txt
graft .github
include HACKING.txt hacking-tox.ini
-include builddocs.sh coverage.sh scaffoldtests.sh
include TODO.txt
global-exclude __pycache__ *.py[cod]
diff --git a/RELEASING.txt b/RELEASING.txt
index b6603c597..ae90a244c 100644
--- a/RELEASING.txt
+++ b/RELEASING.txt
@@ -36,7 +36,7 @@ Prepare new release branch
- Make sure all scaffold tests pass (CPython 2.7, 3.4, 3.5, 3.6, and 3.7, and
PyPy on UNIX; this doesn't work on Windows):
- $ ./scaffoldtests.sh
+ $ tox -e{py27,py34,py35,py36,py37,pypy}-scaffolds
- For each ``pyramid-cookiecutter-*``, make a new branch off "master" with the
same name to align with the new Pyramid release branch name.
@@ -71,17 +71,20 @@ Prepare new release branch
- Change setup.py version to the release version number.
-- Make sure PyPI long description renders (requires ``readme_renderer``
- installed into your Python)::
+- Make sure PyPI long description renders::
- $ python setup.py check -r -s -m
+ $ tox -e lint
- Create a release tag.
-- Make sure your Python has ``setuptools-git``, ``twine``, and ``wheel``
- installed and release to PyPI::
+ $ git tag X.X
+
+- Build the sdist and wheel.
+
+ $ tox -e build
+
+- Upload the artifacts to PyPI:
- $ python setup.py sdist bdist_wheel
$ twine upload dist/pyramid-X.X-*
- Configure RTD to publish the new release version of the docs.
diff --git a/appveyor.yml b/appveyor.yml
index f3ea0b8bd..8c9d158e1 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -6,6 +6,8 @@ environment:
TOXENV: "py36"
- PYTHON: "C:\\Python35"
TOXENV: "py35"
+ - PYTHON: "C:\\Python34"
+ TOXENV: "py34"
- PYTHON: "C:\\Python27"
TOXENV: "py27"
diff --git a/builddocs.sh b/builddocs.sh
deleted file mode 100755
index 0859fe268..000000000
--- a/builddocs.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-tox -e docs
-
diff --git a/coverage.sh b/coverage.sh
deleted file mode 100755
index cd1ff753e..000000000
--- a/coverage.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-tox -epy2-cover,py3-cover,coverage
-
diff --git a/pyramid/tests/fixtures/dummy.ini b/pyramid/tests/fixtures/dummy.ini
deleted file mode 100644
index bc2281168..000000000
--- a/pyramid/tests/fixtures/dummy.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[app:myapp]
-use = call:pyramid.tests.test_paster:make_dummyapp
-
-foo = %(bar)s
diff --git a/pyramid/tests/pkgs/static_assetspec/__init__.py b/pyramid/tests/pkgs/static_assetspec/__init__.py
deleted file mode 100644
index cd6195397..000000000
--- a/pyramid/tests/pkgs/static_assetspec/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-def includeme(config):
- config.add_static_view('/', 'pyramid.tests:fixtures')
-
diff --git a/pyramid/tests/pkgs/static_routeprefix/__init__.py b/pyramid/tests/pkgs/static_routeprefix/__init__.py
deleted file mode 100644
index 9b539380a..000000000
--- a/pyramid/tests/pkgs/static_routeprefix/__init__.py
+++ /dev/null
@@ -1,7 +0,0 @@
-def includeme(config):
- config.add_static_view('/static', 'pyramid.tests:fixtures')
- config.include(includeme2, route_prefix='/prefix')
-
-def includeme2(config):
- config.add_static_view('/static', 'pyramid.tests:fixtures/static')
-
diff --git a/pyramid/tests/pkgs/viewdecoratorapp/__init__.py b/pyramid/tests/pkgs/viewdecoratorapp/__init__.py
deleted file mode 100644
index 5fa98062a..000000000
--- a/pyramid/tests/pkgs/viewdecoratorapp/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-def includeme(config):
- config.scan('pyramid.tests.pkgs.viewdecoratorapp')
-
diff --git a/scaffoldtests.sh b/scaffoldtests.sh
deleted file mode 100755
index fd243e8b2..000000000
--- a/scaffoldtests.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-tox -e{py27,py34,py35,py36,py37,pypy}-scaffolds,
diff --git a/setup.cfg b/setup.cfg
index cb74bd24c..f011b0f61 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -2,9 +2,9 @@
zip_ok = false
[nosetests]
-match=^test
-where=pyramid
-nocapture=1
+match = ^test
+tests = tests
+nocapture = 1
[aliases]
dev = develop easy_install pyramid[testing]
@@ -77,4 +77,4 @@ ignore =
*.egg-info/*
ignore-default-rules = true
ignore-bad-ideas =
- pyramid/tests/pkgs/localeapp/*
+ tests/pkgs/localeapp/*
diff --git a/setup.py b/setup.py
index aa7e3ab60..a49dc6a6a 100644
--- a/setup.py
+++ b/setup.py
@@ -81,7 +81,8 @@ setup(name='pyramid',
author_email="pylons-discuss@googlegroups.com",
url="https://trypyramid.com",
license="BSD-derived (http://www.repoze.org/LICENSE.txt)",
- packages=find_packages(),
+ packages=find_packages('src', exclude=['tests']),
+ package_dir={'': 'src'},
include_package_data=True,
zip_safe=False,
python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*',
@@ -92,7 +93,7 @@ setup(name='pyramid',
'docs': docs_extras,
},
tests_require=tests_require,
- test_suite="pyramid.tests",
+ test_suite="tests",
entry_points="""\
[pyramid.scaffold]
starter=pyramid.scaffolds:StarterProjectTemplate
diff --git a/pyramid/__init__.py b/src/pyramid/__init__.py
index 5bb534f79..5bb534f79 100644
--- a/pyramid/__init__.py
+++ b/src/pyramid/__init__.py
diff --git a/pyramid/asset.py b/src/pyramid/asset.py
index 9d7a3ee63..9d7a3ee63 100644
--- a/pyramid/asset.py
+++ b/src/pyramid/asset.py
diff --git a/pyramid/authentication.py b/src/pyramid/authentication.py
index a9604e336..a9604e336 100644
--- a/pyramid/authentication.py
+++ b/src/pyramid/authentication.py
diff --git a/pyramid/authorization.py b/src/pyramid/authorization.py
index 4845762ef..4845762ef 100644
--- a/pyramid/authorization.py
+++ b/src/pyramid/authorization.py
diff --git a/pyramid/compat.py b/src/pyramid/compat.py
index a7f9c1287..a7f9c1287 100644
--- a/pyramid/compat.py
+++ b/src/pyramid/compat.py
diff --git a/pyramid/config/__init__.py b/src/pyramid/config/__init__.py
index 2f4e133f0..2f4e133f0 100644
--- a/pyramid/config/__init__.py
+++ b/src/pyramid/config/__init__.py
diff --git a/pyramid/config/adapters.py b/src/pyramid/config/adapters.py
index 945faa3c6..945faa3c6 100644
--- a/pyramid/config/adapters.py
+++ b/src/pyramid/config/adapters.py
diff --git a/pyramid/config/assets.py b/src/pyramid/config/assets.py
index b9536df42..b9536df42 100644
--- a/pyramid/config/assets.py
+++ b/src/pyramid/config/assets.py
diff --git a/pyramid/config/factories.py b/src/pyramid/config/factories.py
index 52248269d..52248269d 100644
--- a/pyramid/config/factories.py
+++ b/src/pyramid/config/factories.py
diff --git a/pyramid/config/i18n.py b/src/pyramid/config/i18n.py
index 5dabe2845..5dabe2845 100644
--- a/pyramid/config/i18n.py
+++ b/src/pyramid/config/i18n.py
diff --git a/pyramid/config/predicates.py b/src/pyramid/config/predicates.py
index bda763161..bda763161 100644
--- a/pyramid/config/predicates.py
+++ b/src/pyramid/config/predicates.py
diff --git a/pyramid/config/rendering.py b/src/pyramid/config/rendering.py
index 0d55c41e8..0d55c41e8 100644
--- a/pyramid/config/rendering.py
+++ b/src/pyramid/config/rendering.py
diff --git a/pyramid/config/routes.py b/src/pyramid/config/routes.py
index 5d05429a7..5d05429a7 100644
--- a/pyramid/config/routes.py
+++ b/src/pyramid/config/routes.py
diff --git a/pyramid/config/security.py b/src/pyramid/config/security.py
index c7afbcf4e..c7afbcf4e 100644
--- a/pyramid/config/security.py
+++ b/src/pyramid/config/security.py
diff --git a/pyramid/config/settings.py b/src/pyramid/config/settings.py
index 11a1f7d8c..11a1f7d8c 100644
--- a/pyramid/config/settings.py
+++ b/src/pyramid/config/settings.py
diff --git a/pyramid/config/testing.py b/src/pyramid/config/testing.py
index 1daf5cdeb..1daf5cdeb 100644
--- a/pyramid/config/testing.py
+++ b/src/pyramid/config/testing.py
diff --git a/pyramid/config/tweens.py b/src/pyramid/config/tweens.py
index 8bf21cf71..8bf21cf71 100644
--- a/pyramid/config/tweens.py
+++ b/src/pyramid/config/tweens.py
diff --git a/pyramid/config/util.py b/src/pyramid/config/util.py
index 05d810f6f..05d810f6f 100644
--- a/pyramid/config/util.py
+++ b/src/pyramid/config/util.py
diff --git a/pyramid/config/views.py b/src/pyramid/config/views.py
index e6baa7c17..e6baa7c17 100644
--- a/pyramid/config/views.py
+++ b/src/pyramid/config/views.py
diff --git a/pyramid/config/zca.py b/src/pyramid/config/zca.py
index bcd5c31e3..bcd5c31e3 100644
--- a/pyramid/config/zca.py
+++ b/src/pyramid/config/zca.py
diff --git a/pyramid/csrf.py b/src/pyramid/csrf.py
index da171d9af..da171d9af 100644
--- a/pyramid/csrf.py
+++ b/src/pyramid/csrf.py
diff --git a/pyramid/decorator.py b/src/pyramid/decorator.py
index 065a3feed..065a3feed 100644
--- a/pyramid/decorator.py
+++ b/src/pyramid/decorator.py
diff --git a/pyramid/encode.py b/src/pyramid/encode.py
index 73ff14e62..73ff14e62 100644
--- a/pyramid/encode.py
+++ b/src/pyramid/encode.py
diff --git a/pyramid/events.py b/src/pyramid/events.py
index 93fc127a1..93fc127a1 100644
--- a/pyramid/events.py
+++ b/src/pyramid/events.py
diff --git a/pyramid/exceptions.py b/src/pyramid/exceptions.py
index c95922eb0..c95922eb0 100644
--- a/pyramid/exceptions.py
+++ b/src/pyramid/exceptions.py
diff --git a/pyramid/httpexceptions.py b/src/pyramid/httpexceptions.py
index bef8420b1..bef8420b1 100644
--- a/pyramid/httpexceptions.py
+++ b/src/pyramid/httpexceptions.py
diff --git a/pyramid/i18n.py b/src/pyramid/i18n.py
index 1d11adfe3..1d11adfe3 100644
--- a/pyramid/i18n.py
+++ b/src/pyramid/i18n.py
diff --git a/pyramid/interfaces.py b/src/pyramid/interfaces.py
index 4df5593f8..4df5593f8 100644
--- a/pyramid/interfaces.py
+++ b/src/pyramid/interfaces.py
diff --git a/pyramid/location.py b/src/pyramid/location.py
index 4124895a5..4124895a5 100644
--- a/pyramid/location.py
+++ b/src/pyramid/location.py
diff --git a/pyramid/paster.py b/src/pyramid/paster.py
index f7544f0c5..f7544f0c5 100644
--- a/pyramid/paster.py
+++ b/src/pyramid/paster.py
diff --git a/pyramid/path.py b/src/pyramid/path.py
index 3fac7e940..3fac7e940 100644
--- a/pyramid/path.py
+++ b/src/pyramid/path.py
diff --git a/pyramid/predicates.py b/src/pyramid/predicates.py
index 97edae8a0..97edae8a0 100644
--- a/pyramid/predicates.py
+++ b/src/pyramid/predicates.py
diff --git a/pyramid/registry.py b/src/pyramid/registry.py
index a741c495e..a741c495e 100644
--- a/pyramid/registry.py
+++ b/src/pyramid/registry.py
diff --git a/pyramid/renderers.py b/src/pyramid/renderers.py
index d1c85b371..d1c85b371 100644
--- a/pyramid/renderers.py
+++ b/src/pyramid/renderers.py
diff --git a/pyramid/request.py b/src/pyramid/request.py
index 201f1d648..201f1d648 100644
--- a/pyramid/request.py
+++ b/src/pyramid/request.py
diff --git a/pyramid/resource.py b/src/pyramid/resource.py
index 986c75e37..986c75e37 100644
--- a/pyramid/resource.py
+++ b/src/pyramid/resource.py
diff --git a/pyramid/response.py b/src/pyramid/response.py
index 1e2546ed0..1e2546ed0 100644
--- a/pyramid/response.py
+++ b/src/pyramid/response.py
diff --git a/pyramid/router.py b/src/pyramid/router.py
index 49b7b601b..49b7b601b 100644
--- a/pyramid/router.py
+++ b/src/pyramid/router.py
diff --git a/pyramid/scaffolds/__init__.py b/src/pyramid/scaffolds/__init__.py
index 71a220e22..71a220e22 100644
--- a/pyramid/scaffolds/__init__.py
+++ b/src/pyramid/scaffolds/__init__.py
diff --git a/pyramid/scaffolds/alchemy/+dot+coveragerc_tmpl b/src/pyramid/scaffolds/alchemy/+dot+coveragerc_tmpl
index 273a4a580..273a4a580 100644
--- a/pyramid/scaffolds/alchemy/+dot+coveragerc_tmpl
+++ b/src/pyramid/scaffolds/alchemy/+dot+coveragerc_tmpl
diff --git a/pyramid/scaffolds/alchemy/+package+/__init__.py b/src/pyramid/scaffolds/alchemy/+package+/__init__.py
index 4dab44823..4dab44823 100644
--- a/pyramid/scaffolds/alchemy/+package+/__init__.py
+++ b/src/pyramid/scaffolds/alchemy/+package+/__init__.py
diff --git a/pyramid/scaffolds/alchemy/+package+/models/__init__.py_tmpl b/src/pyramid/scaffolds/alchemy/+package+/models/__init__.py_tmpl
index 521816ce7..521816ce7 100644
--- a/pyramid/scaffolds/alchemy/+package+/models/__init__.py_tmpl
+++ b/src/pyramid/scaffolds/alchemy/+package+/models/__init__.py_tmpl
diff --git a/pyramid/scaffolds/alchemy/+package+/models/meta.py b/src/pyramid/scaffolds/alchemy/+package+/models/meta.py
index 0682247b5..0682247b5 100644
--- a/pyramid/scaffolds/alchemy/+package+/models/meta.py
+++ b/src/pyramid/scaffolds/alchemy/+package+/models/meta.py
diff --git a/pyramid/scaffolds/alchemy/+package+/models/mymodel.py b/src/pyramid/scaffolds/alchemy/+package+/models/mymodel.py
index d65a01a42..d65a01a42 100644
--- a/pyramid/scaffolds/alchemy/+package+/models/mymodel.py
+++ b/src/pyramid/scaffolds/alchemy/+package+/models/mymodel.py
diff --git a/pyramid/scaffolds/alchemy/+package+/routes.py b/src/pyramid/scaffolds/alchemy/+package+/routes.py
index 25504ad4d..25504ad4d 100644
--- a/pyramid/scaffolds/alchemy/+package+/routes.py
+++ b/src/pyramid/scaffolds/alchemy/+package+/routes.py
diff --git a/pyramid/scaffolds/alchemy/+package+/scripts/__init__.py b/src/pyramid/scaffolds/alchemy/+package+/scripts/__init__.py
index 5bb534f79..5bb534f79 100644
--- a/pyramid/scaffolds/alchemy/+package+/scripts/__init__.py
+++ b/src/pyramid/scaffolds/alchemy/+package+/scripts/__init__.py
diff --git a/pyramid/scaffolds/alchemy/+package+/scripts/initializedb.py b/src/pyramid/scaffolds/alchemy/+package+/scripts/initializedb.py
index 7307ecc5c..7307ecc5c 100644
--- a/pyramid/scaffolds/alchemy/+package+/scripts/initializedb.py
+++ b/src/pyramid/scaffolds/alchemy/+package+/scripts/initializedb.py
diff --git a/pyramid/scaffolds/alchemy/+package+/static/pyramid-16x16.png b/src/pyramid/scaffolds/alchemy/+package+/static/pyramid-16x16.png
index 979203112..979203112 100644
--- a/pyramid/scaffolds/alchemy/+package+/static/pyramid-16x16.png
+++ b/src/pyramid/scaffolds/alchemy/+package+/static/pyramid-16x16.png
Binary files differ
diff --git a/pyramid/scaffolds/alchemy/+package+/static/pyramid.png b/src/pyramid/scaffolds/alchemy/+package+/static/pyramid.png
index 4ab837be9..4ab837be9 100644
--- a/pyramid/scaffolds/alchemy/+package+/static/pyramid.png
+++ b/src/pyramid/scaffolds/alchemy/+package+/static/pyramid.png
Binary files differ
diff --git a/pyramid/scaffolds/alchemy/+package+/static/theme.css b/src/pyramid/scaffolds/alchemy/+package+/static/theme.css
index 0f4b1a4d4..0f4b1a4d4 100644
--- a/pyramid/scaffolds/alchemy/+package+/static/theme.css
+++ b/src/pyramid/scaffolds/alchemy/+package+/static/theme.css
diff --git a/pyramid/scaffolds/alchemy/+package+/templates/404.jinja2_tmpl b/src/pyramid/scaffolds/alchemy/+package+/templates/404.jinja2_tmpl
index 1917f83c7..1917f83c7 100644
--- a/pyramid/scaffolds/alchemy/+package+/templates/404.jinja2_tmpl
+++ b/src/pyramid/scaffolds/alchemy/+package+/templates/404.jinja2_tmpl
diff --git a/pyramid/scaffolds/alchemy/+package+/templates/layout.jinja2_tmpl b/src/pyramid/scaffolds/alchemy/+package+/templates/layout.jinja2_tmpl
index d6b3ca9c6..d6b3ca9c6 100644
--- a/pyramid/scaffolds/alchemy/+package+/templates/layout.jinja2_tmpl
+++ b/src/pyramid/scaffolds/alchemy/+package+/templates/layout.jinja2_tmpl
diff --git a/pyramid/scaffolds/alchemy/+package+/templates/mytemplate.jinja2_tmpl b/src/pyramid/scaffolds/alchemy/+package+/templates/mytemplate.jinja2_tmpl
index 01fe5b8e3..01fe5b8e3 100644
--- a/pyramid/scaffolds/alchemy/+package+/templates/mytemplate.jinja2_tmpl
+++ b/src/pyramid/scaffolds/alchemy/+package+/templates/mytemplate.jinja2_tmpl
diff --git a/pyramid/scaffolds/alchemy/+package+/tests.py_tmpl b/src/pyramid/scaffolds/alchemy/+package+/tests.py_tmpl
index 072eab5b2..072eab5b2 100644
--- a/pyramid/scaffolds/alchemy/+package+/tests.py_tmpl
+++ b/src/pyramid/scaffolds/alchemy/+package+/tests.py_tmpl
diff --git a/pyramid/scaffolds/alchemy/+package+/views/__init__.py b/src/pyramid/scaffolds/alchemy/+package+/views/__init__.py
index e69de29bb..e69de29bb 100644
--- a/pyramid/scaffolds/alchemy/+package+/views/__init__.py
+++ b/src/pyramid/scaffolds/alchemy/+package+/views/__init__.py
diff --git a/pyramid/scaffolds/alchemy/+package+/views/default.py_tmpl b/src/pyramid/scaffolds/alchemy/+package+/views/default.py_tmpl
index 7bf0026e5..7bf0026e5 100644
--- a/pyramid/scaffolds/alchemy/+package+/views/default.py_tmpl
+++ b/src/pyramid/scaffolds/alchemy/+package+/views/default.py_tmpl
diff --git a/pyramid/scaffolds/alchemy/+package+/views/notfound.py_tmpl b/src/pyramid/scaffolds/alchemy/+package+/views/notfound.py_tmpl
index 69d6e2804..69d6e2804 100644
--- a/pyramid/scaffolds/alchemy/+package+/views/notfound.py_tmpl
+++ b/src/pyramid/scaffolds/alchemy/+package+/views/notfound.py_tmpl
diff --git a/pyramid/scaffolds/alchemy/CHANGES.txt_tmpl b/src/pyramid/scaffolds/alchemy/CHANGES.txt_tmpl
index 35a34f332..35a34f332 100644
--- a/pyramid/scaffolds/alchemy/CHANGES.txt_tmpl
+++ b/src/pyramid/scaffolds/alchemy/CHANGES.txt_tmpl
diff --git a/pyramid/scaffolds/alchemy/MANIFEST.in_tmpl b/src/pyramid/scaffolds/alchemy/MANIFEST.in_tmpl
index f93f45544..f93f45544 100644
--- a/pyramid/scaffolds/alchemy/MANIFEST.in_tmpl
+++ b/src/pyramid/scaffolds/alchemy/MANIFEST.in_tmpl
diff --git a/pyramid/scaffolds/alchemy/README.txt_tmpl b/src/pyramid/scaffolds/alchemy/README.txt_tmpl
index 83c37edea..83c37edea 100644
--- a/pyramid/scaffolds/alchemy/README.txt_tmpl
+++ b/src/pyramid/scaffolds/alchemy/README.txt_tmpl
diff --git a/pyramid/scaffolds/alchemy/development.ini_tmpl b/src/pyramid/scaffolds/alchemy/development.ini_tmpl
index 3cfb3996d..3cfb3996d 100644
--- a/pyramid/scaffolds/alchemy/development.ini_tmpl
+++ b/src/pyramid/scaffolds/alchemy/development.ini_tmpl
diff --git a/pyramid/scaffolds/alchemy/production.ini_tmpl b/src/pyramid/scaffolds/alchemy/production.ini_tmpl
index 043229a71..043229a71 100644
--- a/pyramid/scaffolds/alchemy/production.ini_tmpl
+++ b/src/pyramid/scaffolds/alchemy/production.ini_tmpl
diff --git a/pyramid/scaffolds/alchemy/pytest.ini_tmpl b/src/pyramid/scaffolds/alchemy/pytest.ini_tmpl
index a30c8bcad..a30c8bcad 100644
--- a/pyramid/scaffolds/alchemy/pytest.ini_tmpl
+++ b/src/pyramid/scaffolds/alchemy/pytest.ini_tmpl
diff --git a/pyramid/scaffolds/alchemy/setup.py_tmpl b/src/pyramid/scaffolds/alchemy/setup.py_tmpl
index 9318817dc..9318817dc 100644
--- a/pyramid/scaffolds/alchemy/setup.py_tmpl
+++ b/src/pyramid/scaffolds/alchemy/setup.py_tmpl
diff --git a/pyramid/scaffolds/copydir.py b/src/pyramid/scaffolds/copydir.py
index 0914bb0d4..0914bb0d4 100644
--- a/pyramid/scaffolds/copydir.py
+++ b/src/pyramid/scaffolds/copydir.py
diff --git a/pyramid/scaffolds/starter/+dot+coveragerc_tmpl b/src/pyramid/scaffolds/starter/+dot+coveragerc_tmpl
index 273a4a580..273a4a580 100644
--- a/pyramid/scaffolds/starter/+dot+coveragerc_tmpl
+++ b/src/pyramid/scaffolds/starter/+dot+coveragerc_tmpl
diff --git a/pyramid/scaffolds/starter/+package+/__init__.py b/src/pyramid/scaffolds/starter/+package+/__init__.py
index 49dde36d4..49dde36d4 100644
--- a/pyramid/scaffolds/starter/+package+/__init__.py
+++ b/src/pyramid/scaffolds/starter/+package+/__init__.py
diff --git a/pyramid/scaffolds/starter/+package+/static/pyramid-16x16.png b/src/pyramid/scaffolds/starter/+package+/static/pyramid-16x16.png
index 979203112..979203112 100644
--- a/pyramid/scaffolds/starter/+package+/static/pyramid-16x16.png
+++ b/src/pyramid/scaffolds/starter/+package+/static/pyramid-16x16.png
Binary files differ
diff --git a/pyramid/scaffolds/starter/+package+/static/pyramid.png b/src/pyramid/scaffolds/starter/+package+/static/pyramid.png
index 4ab837be9..4ab837be9 100644
--- a/pyramid/scaffolds/starter/+package+/static/pyramid.png
+++ b/src/pyramid/scaffolds/starter/+package+/static/pyramid.png
Binary files differ
diff --git a/pyramid/scaffolds/starter/+package+/static/theme.css b/src/pyramid/scaffolds/starter/+package+/static/theme.css
index be50ad420..be50ad420 100644
--- a/pyramid/scaffolds/starter/+package+/static/theme.css
+++ b/src/pyramid/scaffolds/starter/+package+/static/theme.css
diff --git a/pyramid/scaffolds/starter/+package+/templates/layout.jinja2_tmpl b/src/pyramid/scaffolds/starter/+package+/templates/layout.jinja2_tmpl
index 54baf7a2a..54baf7a2a 100644
--- a/pyramid/scaffolds/starter/+package+/templates/layout.jinja2_tmpl
+++ b/src/pyramid/scaffolds/starter/+package+/templates/layout.jinja2_tmpl
diff --git a/pyramid/scaffolds/starter/+package+/templates/mytemplate.jinja2_tmpl b/src/pyramid/scaffolds/starter/+package+/templates/mytemplate.jinja2_tmpl
index f826ff9e7..f826ff9e7 100644
--- a/pyramid/scaffolds/starter/+package+/templates/mytemplate.jinja2_tmpl
+++ b/src/pyramid/scaffolds/starter/+package+/templates/mytemplate.jinja2_tmpl
diff --git a/pyramid/scaffolds/starter/+package+/tests.py_tmpl b/src/pyramid/scaffolds/starter/+package+/tests.py_tmpl
index 30f3f0430..30f3f0430 100644
--- a/pyramid/scaffolds/starter/+package+/tests.py_tmpl
+++ b/src/pyramid/scaffolds/starter/+package+/tests.py_tmpl
diff --git a/pyramid/scaffolds/starter/+package+/views.py_tmpl b/src/pyramid/scaffolds/starter/+package+/views.py_tmpl
index 01b9d0130..01b9d0130 100644
--- a/pyramid/scaffolds/starter/+package+/views.py_tmpl
+++ b/src/pyramid/scaffolds/starter/+package+/views.py_tmpl
diff --git a/pyramid/scaffolds/starter/CHANGES.txt_tmpl b/src/pyramid/scaffolds/starter/CHANGES.txt_tmpl
index 35a34f332..35a34f332 100644
--- a/pyramid/scaffolds/starter/CHANGES.txt_tmpl
+++ b/src/pyramid/scaffolds/starter/CHANGES.txt_tmpl
diff --git a/pyramid/scaffolds/starter/MANIFEST.in_tmpl b/src/pyramid/scaffolds/starter/MANIFEST.in_tmpl
index 4d1c86b44..4d1c86b44 100644
--- a/pyramid/scaffolds/starter/MANIFEST.in_tmpl
+++ b/src/pyramid/scaffolds/starter/MANIFEST.in_tmpl
diff --git a/pyramid/scaffolds/starter/README.txt_tmpl b/src/pyramid/scaffolds/starter/README.txt_tmpl
index 127ad7595..127ad7595 100644
--- a/pyramid/scaffolds/starter/README.txt_tmpl
+++ b/src/pyramid/scaffolds/starter/README.txt_tmpl
diff --git a/pyramid/scaffolds/starter/development.ini_tmpl b/src/pyramid/scaffolds/starter/development.ini_tmpl
index c6e42d97c..c6e42d97c 100644
--- a/pyramid/scaffolds/starter/development.ini_tmpl
+++ b/src/pyramid/scaffolds/starter/development.ini_tmpl
diff --git a/pyramid/scaffolds/starter/production.ini_tmpl b/src/pyramid/scaffolds/starter/production.ini_tmpl
index 1107a6b2f..1107a6b2f 100644
--- a/pyramid/scaffolds/starter/production.ini_tmpl
+++ b/src/pyramid/scaffolds/starter/production.ini_tmpl
diff --git a/pyramid/scaffolds/starter/pytest.ini_tmpl b/src/pyramid/scaffolds/starter/pytest.ini_tmpl
index a30c8bcad..a30c8bcad 100644
--- a/pyramid/scaffolds/starter/pytest.ini_tmpl
+++ b/src/pyramid/scaffolds/starter/pytest.ini_tmpl
diff --git a/pyramid/scaffolds/starter/setup.py_tmpl b/src/pyramid/scaffolds/starter/setup.py_tmpl
index 7f50bbbc2..7f50bbbc2 100644
--- a/pyramid/scaffolds/starter/setup.py_tmpl
+++ b/src/pyramid/scaffolds/starter/setup.py_tmpl
diff --git a/pyramid/scaffolds/template.py b/src/pyramid/scaffolds/template.py
index e5098e815..e5098e815 100644
--- a/pyramid/scaffolds/template.py
+++ b/src/pyramid/scaffolds/template.py
diff --git a/pyramid/scaffolds/tests.py b/src/pyramid/scaffolds/tests.py
index 44680a464..44680a464 100644
--- a/pyramid/scaffolds/tests.py
+++ b/src/pyramid/scaffolds/tests.py
diff --git a/pyramid/scaffolds/zodb/+dot+coveragerc_tmpl b/src/pyramid/scaffolds/zodb/+dot+coveragerc_tmpl
index 273a4a580..273a4a580 100644
--- a/pyramid/scaffolds/zodb/+dot+coveragerc_tmpl
+++ b/src/pyramid/scaffolds/zodb/+dot+coveragerc_tmpl
diff --git a/pyramid/scaffolds/zodb/+package+/__init__.py b/src/pyramid/scaffolds/zodb/+package+/__init__.py
index a956d0faf..a956d0faf 100644
--- a/pyramid/scaffolds/zodb/+package+/__init__.py
+++ b/src/pyramid/scaffolds/zodb/+package+/__init__.py
diff --git a/pyramid/scaffolds/zodb/+package+/models.py b/src/pyramid/scaffolds/zodb/+package+/models.py
index e5aa3e9f7..e5aa3e9f7 100644
--- a/pyramid/scaffolds/zodb/+package+/models.py
+++ b/src/pyramid/scaffolds/zodb/+package+/models.py
diff --git a/pyramid/scaffolds/zodb/+package+/static/pyramid-16x16.png b/src/pyramid/scaffolds/zodb/+package+/static/pyramid-16x16.png
index 979203112..979203112 100644
--- a/pyramid/scaffolds/zodb/+package+/static/pyramid-16x16.png
+++ b/src/pyramid/scaffolds/zodb/+package+/static/pyramid-16x16.png
Binary files differ
diff --git a/pyramid/scaffolds/zodb/+package+/static/pyramid.png b/src/pyramid/scaffolds/zodb/+package+/static/pyramid.png
index 4ab837be9..4ab837be9 100644
--- a/pyramid/scaffolds/zodb/+package+/static/pyramid.png
+++ b/src/pyramid/scaffolds/zodb/+package+/static/pyramid.png
Binary files differ
diff --git a/pyramid/scaffolds/zodb/+package+/static/theme.css b/src/pyramid/scaffolds/zodb/+package+/static/theme.css
index 0f4b1a4d4..0f4b1a4d4 100644
--- a/pyramid/scaffolds/zodb/+package+/static/theme.css
+++ b/src/pyramid/scaffolds/zodb/+package+/static/theme.css
diff --git a/pyramid/scaffolds/zodb/+package+/templates/mytemplate.pt_tmpl b/src/pyramid/scaffolds/zodb/+package+/templates/mytemplate.pt_tmpl
index f66effa41..f66effa41 100644
--- a/pyramid/scaffolds/zodb/+package+/templates/mytemplate.pt_tmpl
+++ b/src/pyramid/scaffolds/zodb/+package+/templates/mytemplate.pt_tmpl
diff --git a/pyramid/scaffolds/zodb/+package+/tests.py_tmpl b/src/pyramid/scaffolds/zodb/+package+/tests.py_tmpl
index 94912a850..94912a850 100644
--- a/pyramid/scaffolds/zodb/+package+/tests.py_tmpl
+++ b/src/pyramid/scaffolds/zodb/+package+/tests.py_tmpl
diff --git a/pyramid/scaffolds/zodb/+package+/views.py_tmpl b/src/pyramid/scaffolds/zodb/+package+/views.py_tmpl
index 1e8a9b65a..1e8a9b65a 100644
--- a/pyramid/scaffolds/zodb/+package+/views.py_tmpl
+++ b/src/pyramid/scaffolds/zodb/+package+/views.py_tmpl
diff --git a/pyramid/scaffolds/zodb/CHANGES.txt_tmpl b/src/pyramid/scaffolds/zodb/CHANGES.txt_tmpl
index 35a34f332..35a34f332 100644
--- a/pyramid/scaffolds/zodb/CHANGES.txt_tmpl
+++ b/src/pyramid/scaffolds/zodb/CHANGES.txt_tmpl
diff --git a/pyramid/scaffolds/zodb/MANIFEST.in_tmpl b/src/pyramid/scaffolds/zodb/MANIFEST.in_tmpl
index 0ff6eb7a0..0ff6eb7a0 100644
--- a/pyramid/scaffolds/zodb/MANIFEST.in_tmpl
+++ b/src/pyramid/scaffolds/zodb/MANIFEST.in_tmpl
diff --git a/pyramid/scaffolds/zodb/README.txt_tmpl b/src/pyramid/scaffolds/zodb/README.txt_tmpl
index 127ad7595..127ad7595 100644
--- a/pyramid/scaffolds/zodb/README.txt_tmpl
+++ b/src/pyramid/scaffolds/zodb/README.txt_tmpl
diff --git a/pyramid/scaffolds/zodb/development.ini_tmpl b/src/pyramid/scaffolds/zodb/development.ini_tmpl
index 7d898bcd4..7d898bcd4 100644
--- a/pyramid/scaffolds/zodb/development.ini_tmpl
+++ b/src/pyramid/scaffolds/zodb/development.ini_tmpl
diff --git a/pyramid/scaffolds/zodb/production.ini_tmpl b/src/pyramid/scaffolds/zodb/production.ini_tmpl
index 7c2e90c2e..7c2e90c2e 100644
--- a/pyramid/scaffolds/zodb/production.ini_tmpl
+++ b/src/pyramid/scaffolds/zodb/production.ini_tmpl
diff --git a/pyramid/scaffolds/zodb/pytest.ini_tmpl b/src/pyramid/scaffolds/zodb/pytest.ini_tmpl
index a30c8bcad..a30c8bcad 100644
--- a/pyramid/scaffolds/zodb/pytest.ini_tmpl
+++ b/src/pyramid/scaffolds/zodb/pytest.ini_tmpl
diff --git a/pyramid/scaffolds/zodb/setup.py_tmpl b/src/pyramid/scaffolds/zodb/setup.py_tmpl
index 19771d756..19771d756 100644
--- a/pyramid/scaffolds/zodb/setup.py_tmpl
+++ b/src/pyramid/scaffolds/zodb/setup.py_tmpl
diff --git a/pyramid/scripting.py b/src/pyramid/scripting.py
index 087b55ccb..087b55ccb 100644
--- a/pyramid/scripting.py
+++ b/src/pyramid/scripting.py
diff --git a/pyramid/scripts/__init__.py b/src/pyramid/scripts/__init__.py
index 5bb534f79..5bb534f79 100644
--- a/pyramid/scripts/__init__.py
+++ b/src/pyramid/scripts/__init__.py
diff --git a/pyramid/scripts/common.py b/src/pyramid/scripts/common.py
index f4b8027db..f4b8027db 100644
--- a/pyramid/scripts/common.py
+++ b/src/pyramid/scripts/common.py
diff --git a/pyramid/scripts/pcreate.py b/src/pyramid/scripts/pcreate.py
index a6db520ce..a6db520ce 100644
--- a/pyramid/scripts/pcreate.py
+++ b/src/pyramid/scripts/pcreate.py
diff --git a/pyramid/scripts/pdistreport.py b/src/pyramid/scripts/pdistreport.py
index 1952e5d39..1952e5d39 100644
--- a/pyramid/scripts/pdistreport.py
+++ b/src/pyramid/scripts/pdistreport.py
diff --git a/pyramid/scripts/prequest.py b/src/pyramid/scripts/prequest.py
index f0681afd7..f0681afd7 100644
--- a/pyramid/scripts/prequest.py
+++ b/src/pyramid/scripts/prequest.py
diff --git a/pyramid/scripts/proutes.py b/src/pyramid/scripts/proutes.py
index 69d61ae8f..69d61ae8f 100644
--- a/pyramid/scripts/proutes.py
+++ b/src/pyramid/scripts/proutes.py
diff --git a/pyramid/scripts/pserve.py b/src/pyramid/scripts/pserve.py
index 8ee6e1467..8ee6e1467 100644
--- a/pyramid/scripts/pserve.py
+++ b/src/pyramid/scripts/pserve.py
diff --git a/pyramid/scripts/pshell.py b/src/pyramid/scripts/pshell.py
index 4898eb39f..4898eb39f 100644
--- a/pyramid/scripts/pshell.py
+++ b/src/pyramid/scripts/pshell.py
diff --git a/pyramid/scripts/ptweens.py b/src/pyramid/scripts/ptweens.py
index d5cbebe12..d5cbebe12 100644
--- a/pyramid/scripts/ptweens.py
+++ b/src/pyramid/scripts/ptweens.py
diff --git a/pyramid/scripts/pviews.py b/src/pyramid/scripts/pviews.py
index c0df2f078..c0df2f078 100644
--- a/pyramid/scripts/pviews.py
+++ b/src/pyramid/scripts/pviews.py
diff --git a/pyramid/security.py b/src/pyramid/security.py
index 0bdca090b..0bdca090b 100644
--- a/pyramid/security.py
+++ b/src/pyramid/security.py
diff --git a/pyramid/session.py b/src/pyramid/session.py
index b953fa184..b953fa184 100644
--- a/pyramid/session.py
+++ b/src/pyramid/session.py
diff --git a/pyramid/settings.py b/src/pyramid/settings.py
index 8a498d572..8a498d572 100644
--- a/pyramid/settings.py
+++ b/src/pyramid/settings.py
diff --git a/pyramid/static.py b/src/pyramid/static.py
index 70fdf877b..70fdf877b 100644
--- a/pyramid/static.py
+++ b/src/pyramid/static.py
diff --git a/pyramid/testing.py b/src/pyramid/testing.py
index 4986c0e27..4986c0e27 100644
--- a/pyramid/testing.py
+++ b/src/pyramid/testing.py
diff --git a/pyramid/threadlocal.py b/src/pyramid/threadlocal.py
index e8f825715..e8f825715 100644
--- a/pyramid/threadlocal.py
+++ b/src/pyramid/threadlocal.py
diff --git a/pyramid/traversal.py b/src/pyramid/traversal.py
index d8f4690fd..d8f4690fd 100644
--- a/pyramid/traversal.py
+++ b/src/pyramid/traversal.py
diff --git a/pyramid/tweens.py b/src/pyramid/tweens.py
index 740b6961c..740b6961c 100644
--- a/pyramid/tweens.py
+++ b/src/pyramid/tweens.py
diff --git a/pyramid/url.py b/src/pyramid/url.py
index 852aa5e55..852aa5e55 100644
--- a/pyramid/url.py
+++ b/src/pyramid/url.py
diff --git a/pyramid/urldispatch.py b/src/pyramid/urldispatch.py
index a61071845..a61071845 100644
--- a/pyramid/urldispatch.py
+++ b/src/pyramid/urldispatch.py
diff --git a/pyramid/util.py b/src/pyramid/util.py
index 6655455bf..6655455bf 100644
--- a/pyramid/util.py
+++ b/src/pyramid/util.py
diff --git a/pyramid/view.py b/src/pyramid/view.py
index 769328344..769328344 100644
--- a/pyramid/view.py
+++ b/src/pyramid/view.py
diff --git a/pyramid/viewderivers.py b/src/pyramid/viewderivers.py
index d914a4752..d914a4752 100644
--- a/pyramid/viewderivers.py
+++ b/src/pyramid/viewderivers.py
diff --git a/pyramid/wsgi.py b/src/pyramid/wsgi.py
index 1c1bded32..1c1bded32 100644
--- a/pyramid/wsgi.py
+++ b/src/pyramid/wsgi.py
diff --git a/pyramid/tests/__init__.py b/tests/__init__.py
index a62c29f47..a62c29f47 100644
--- a/pyramid/tests/__init__.py
+++ b/tests/__init__.py
diff --git a/tests/fixtures/dummy.ini b/tests/fixtures/dummy.ini
new file mode 100644
index 000000000..fffaf75c8
--- /dev/null
+++ b/tests/fixtures/dummy.ini
@@ -0,0 +1,4 @@
+[app:myapp]
+use = call:tests.test_paster:make_dummyapp
+
+foo = %(bar)s
diff --git a/pyramid/tests/fixtures/manifest.json b/tests/fixtures/manifest.json
index 0a43bc5e3..0a43bc5e3 100644
--- a/pyramid/tests/fixtures/manifest.json
+++ b/tests/fixtures/manifest.json
diff --git a/pyramid/tests/fixtures/manifest2.json b/tests/fixtures/manifest2.json
index fd6b9a7bb..fd6b9a7bb 100644
--- a/pyramid/tests/fixtures/manifest2.json
+++ b/tests/fixtures/manifest2.json
diff --git a/pyramid/tests/fixtures/minimal.jpg b/tests/fixtures/minimal.jpg
index 1cda9a53d..1cda9a53d 100644
--- a/pyramid/tests/fixtures/minimal.jpg
+++ b/tests/fixtures/minimal.jpg
Binary files differ
diff --git a/pyramid/tests/fixtures/minimal.pdf b/tests/fixtures/minimal.pdf
index e267be996..e267be996 100755
--- a/pyramid/tests/fixtures/minimal.pdf
+++ b/tests/fixtures/minimal.pdf
Binary files differ
diff --git a/pyramid/tests/fixtures/minimal.txt b/tests/fixtures/minimal.txt
index 18832d351..18832d351 100644
--- a/pyramid/tests/fixtures/minimal.txt
+++ b/tests/fixtures/minimal.txt
diff --git a/pyramid/tests/fixtures/minimal.xml b/tests/fixtures/minimal.xml
index 1972c155d..1972c155d 100644
--- a/pyramid/tests/fixtures/minimal.xml
+++ b/tests/fixtures/minimal.xml
diff --git a/pyramid/tests/fixtures/nonminimal.txt b/tests/fixtures/nonminimal.txt
index 9de95ec92..9de95ec92 100644
--- a/pyramid/tests/fixtures/nonminimal.txt
+++ b/tests/fixtures/nonminimal.txt
diff --git a/pyramid/tests/fixtures/static/.hiddenfile b/tests/fixtures/static/.hiddenfile
index 86d345000..86d345000 100644
--- a/pyramid/tests/fixtures/static/.hiddenfile
+++ b/tests/fixtures/static/.hiddenfile
diff --git a/pyramid/tests/fixtures/static/arcs.svg.tgz b/tests/fixtures/static/arcs.svg.tgz
index 376c42ac8..376c42ac8 100644
--- a/pyramid/tests/fixtures/static/arcs.svg.tgz
+++ b/tests/fixtures/static/arcs.svg.tgz
diff --git a/pyramid/tests/fixtures/static/index.html b/tests/fixtures/static/index.html
index 0470710b2..0470710b2 100644
--- a/pyramid/tests/fixtures/static/index.html
+++ b/tests/fixtures/static/index.html
diff --git a/pyramid/tests/fixtures/static/subdir/index.html b/tests/fixtures/static/subdir/index.html
index bb84fad04..bb84fad04 100644
--- a/pyramid/tests/fixtures/static/subdir/index.html
+++ b/tests/fixtures/static/subdir/index.html
diff --git a/pyramid/tests/pkgs/__init__.py b/tests/pkgs/__init__.py
index 5bb534f79..5bb534f79 100644
--- a/pyramid/tests/pkgs/__init__.py
+++ b/tests/pkgs/__init__.py
diff --git a/pyramid/tests/pkgs/ccbugapp/__init__.py b/tests/pkgs/ccbugapp/__init__.py
index afe21d4e0..afe21d4e0 100644
--- a/pyramid/tests/pkgs/ccbugapp/__init__.py
+++ b/tests/pkgs/ccbugapp/__init__.py
diff --git a/pyramid/tests/pkgs/conflictapp/__init__.py b/tests/pkgs/conflictapp/__init__.py
index 38116ab2f..d85aa0e1e 100644
--- a/pyramid/tests/pkgs/conflictapp/__init__.py
+++ b/tests/pkgs/conflictapp/__init__.py
@@ -21,4 +21,4 @@ def includeme(config):
config.set_authentication_policy(AuthTktAuthenticationPolicy(
'seekri1t', hashalg='sha512'))
config.set_authorization_policy(ACLAuthorizationPolicy())
- config.include('pyramid.tests.pkgs.conflictapp.included')
+ config.include('tests.pkgs.conflictapp.included')
diff --git a/pyramid/tests/pkgs/conflictapp/included.py b/tests/pkgs/conflictapp/included.py
index 0b76fb2bc..0b76fb2bc 100644
--- a/pyramid/tests/pkgs/conflictapp/included.py
+++ b/tests/pkgs/conflictapp/included.py
diff --git a/pyramid/tests/pkgs/defpermbugapp/__init__.py b/tests/pkgs/defpermbugapp/__init__.py
index 032e8c626..3e59aa623 100644
--- a/pyramid/tests/pkgs/defpermbugapp/__init__.py
+++ b/tests/pkgs/defpermbugapp/__init__.py
@@ -19,7 +19,7 @@ def includeme(config):
from pyramid.authentication import AuthTktAuthenticationPolicy
authn_policy = AuthTktAuthenticationPolicy('seekt1t', hashalg='sha512')
authz_policy = ACLAuthorizationPolicy()
- config.scan('pyramid.tests.pkgs.defpermbugapp')
+ config.scan('tests.pkgs.defpermbugapp')
config._set_authentication_policy(authn_policy)
config._set_authorization_policy(authz_policy)
config.set_default_permission('private')
diff --git a/pyramid/tests/pkgs/eventonly/__init__.py b/tests/pkgs/eventonly/__init__.py
index 7ae93ada6..452ae35a7 100644
--- a/pyramid/tests/pkgs/eventonly/__init__.py
+++ b/tests/pkgs/eventonly/__init__.py
@@ -60,5 +60,5 @@ def sendfoobar(request):
def includeme(config):
config.add_subscriber_predicate('yup', Yup)
- config.scan('pyramid.tests.pkgs.eventonly')
+ config.scan('tests.pkgs.eventonly')
diff --git a/pyramid/tests/pkgs/exceptionviewapp/__init__.py b/tests/pkgs/exceptionviewapp/__init__.py
index ffc1b47c6..ffc1b47c6 100644
--- a/pyramid/tests/pkgs/exceptionviewapp/__init__.py
+++ b/tests/pkgs/exceptionviewapp/__init__.py
diff --git a/pyramid/tests/pkgs/exceptionviewapp/models.py b/tests/pkgs/exceptionviewapp/models.py
index fe407badc..fe407badc 100644
--- a/pyramid/tests/pkgs/exceptionviewapp/models.py
+++ b/tests/pkgs/exceptionviewapp/models.py
diff --git a/pyramid/tests/pkgs/exceptionviewapp/views.py b/tests/pkgs/exceptionviewapp/views.py
index 4953056bc..4953056bc 100644
--- a/pyramid/tests/pkgs/exceptionviewapp/views.py
+++ b/tests/pkgs/exceptionviewapp/views.py
diff --git a/pyramid/tests/pkgs/fixtureapp/__init__.py b/tests/pkgs/fixtureapp/__init__.py
index 27063aae2..27063aae2 100644
--- a/pyramid/tests/pkgs/fixtureapp/__init__.py
+++ b/tests/pkgs/fixtureapp/__init__.py
diff --git a/pyramid/tests/pkgs/fixtureapp/models.py b/tests/pkgs/fixtureapp/models.py
index d80d14bb3..d80d14bb3 100644
--- a/pyramid/tests/pkgs/fixtureapp/models.py
+++ b/tests/pkgs/fixtureapp/models.py
diff --git a/pyramid/tests/pkgs/fixtureapp/subpackage/__init__.py b/tests/pkgs/fixtureapp/subpackage/__init__.py
index d3173e636..d3173e636 100644
--- a/pyramid/tests/pkgs/fixtureapp/subpackage/__init__.py
+++ b/tests/pkgs/fixtureapp/subpackage/__init__.py
diff --git a/pyramid/tests/pkgs/fixtureapp/views.py b/tests/pkgs/fixtureapp/views.py
index cbfc5a574..cbfc5a574 100644
--- a/pyramid/tests/pkgs/fixtureapp/views.py
+++ b/tests/pkgs/fixtureapp/views.py
diff --git a/pyramid/tests/pkgs/forbiddenapp/__init__.py b/tests/pkgs/forbiddenapp/__init__.py
index c378126fc..c378126fc 100644
--- a/pyramid/tests/pkgs/forbiddenapp/__init__.py
+++ b/tests/pkgs/forbiddenapp/__init__.py
diff --git a/pyramid/tests/pkgs/forbiddenview/__init__.py b/tests/pkgs/forbiddenview/__init__.py
index 45fb8380b..6b4c3c116 100644
--- a/pyramid/tests/pkgs/forbiddenview/__init__.py
+++ b/tests/pkgs/forbiddenview/__init__.py
@@ -27,5 +27,5 @@ def includeme(config):
config.set_default_permission('a')
config.add_route('foo', '/foo')
config.add_route('bar', '/bar')
- config.scan('pyramid.tests.pkgs.forbiddenview')
+ config.scan('tests.pkgs.forbiddenview')
diff --git a/pyramid/tests/pkgs/hybridapp/__init__.py b/tests/pkgs/hybridapp/__init__.py
index 1cc2dde83..1cc2dde83 100644
--- a/pyramid/tests/pkgs/hybridapp/__init__.py
+++ b/tests/pkgs/hybridapp/__init__.py
diff --git a/pyramid/tests/pkgs/hybridapp/views.py b/tests/pkgs/hybridapp/views.py
index 135ef8290..135ef8290 100644
--- a/pyramid/tests/pkgs/hybridapp/views.py
+++ b/tests/pkgs/hybridapp/views.py
diff --git a/pyramid/tests/pkgs/includeapp1/__init__.py b/tests/pkgs/includeapp1/__init__.py
index eaeeb7ef6..eaeeb7ef6 100644
--- a/pyramid/tests/pkgs/includeapp1/__init__.py
+++ b/tests/pkgs/includeapp1/__init__.py
diff --git a/pyramid/tests/pkgs/includeapp1/root.py b/tests/pkgs/includeapp1/root.py
index f56203cfa..986356d81 100644
--- a/pyramid/tests/pkgs/includeapp1/root.py
+++ b/tests/pkgs/includeapp1/root.py
@@ -5,6 +5,6 @@ def aview(request):
def configure(config):
config.add_view(aview)
- config.include('pyramid.tests.pkgs.includeapp1.two.configure')
+ config.include('tests.pkgs.includeapp1.two.configure')
config.commit()
diff --git a/pyramid/tests/pkgs/includeapp1/three.py b/tests/pkgs/includeapp1/three.py
index e7131bcf5..973f91d99 100644
--- a/pyramid/tests/pkgs/includeapp1/three.py
+++ b/tests/pkgs/includeapp1/three.py
@@ -5,6 +5,6 @@ def aview(request):
def configure(config):
config.add_view(aview, name='three')
- config.include('pyramid.tests.pkgs.includeapp1.two.configure') # should not cycle
+ config.include('tests.pkgs.includeapp1.two.configure') # should not cycle
config.add_view(aview) # will be overridden by root when resolved
diff --git a/pyramid/tests/pkgs/includeapp1/two.py b/tests/pkgs/includeapp1/two.py
index 99b0f883a..6b8bb5539 100644
--- a/pyramid/tests/pkgs/includeapp1/two.py
+++ b/tests/pkgs/includeapp1/two.py
@@ -5,5 +5,5 @@ def aview(request):
def configure(config):
config.add_view(aview, name='two')
- config.include('pyramid.tests.pkgs.includeapp1.three.configure')
+ config.include('tests.pkgs.includeapp1.three.configure')
config.add_view(aview) # will be overridden by root when resolved
diff --git a/pyramid/tests/pkgs/localeapp/__init__.py b/tests/pkgs/localeapp/__init__.py
index 1a35cdb4a..1a35cdb4a 100644
--- a/pyramid/tests/pkgs/localeapp/__init__.py
+++ b/tests/pkgs/localeapp/__init__.py
diff --git a/pyramid/tests/pkgs/localeapp/locale/GARBAGE b/tests/pkgs/localeapp/locale/GARBAGE
index 032c55584..032c55584 100644
--- a/pyramid/tests/pkgs/localeapp/locale/GARBAGE
+++ b/tests/pkgs/localeapp/locale/GARBAGE
diff --git a/pyramid/tests/pkgs/localeapp/locale/be/LC_MESSAGES b/tests/pkgs/localeapp/locale/be/LC_MESSAGES
index 909cf6a3b..909cf6a3b 100644
--- a/pyramid/tests/pkgs/localeapp/locale/be/LC_MESSAGES
+++ b/tests/pkgs/localeapp/locale/be/LC_MESSAGES
diff --git a/pyramid/tests/pkgs/localeapp/locale/de/LC_MESSAGES/deformsite.mo b/tests/pkgs/localeapp/locale/de/LC_MESSAGES/deformsite.mo
index 2924a5eb5..2924a5eb5 100644
--- a/pyramid/tests/pkgs/localeapp/locale/de/LC_MESSAGES/deformsite.mo
+++ b/tests/pkgs/localeapp/locale/de/LC_MESSAGES/deformsite.mo
Binary files differ
diff --git a/pyramid/tests/pkgs/localeapp/locale/de/LC_MESSAGES/deformsite.po b/tests/pkgs/localeapp/locale/de/LC_MESSAGES/deformsite.po
index 17f87bc19..17f87bc19 100644
--- a/pyramid/tests/pkgs/localeapp/locale/de/LC_MESSAGES/deformsite.po
+++ b/tests/pkgs/localeapp/locale/de/LC_MESSAGES/deformsite.po
diff --git a/pyramid/tests/pkgs/localeapp/locale/de_DE/LC_MESSAGES/deformsite.mo b/tests/pkgs/localeapp/locale/de_DE/LC_MESSAGES/deformsite.mo
index e3b2b0881..e3b2b0881 100644
--- a/pyramid/tests/pkgs/localeapp/locale/de_DE/LC_MESSAGES/deformsite.mo
+++ b/tests/pkgs/localeapp/locale/de_DE/LC_MESSAGES/deformsite.mo
Binary files differ
diff --git a/pyramid/tests/pkgs/localeapp/locale/de_DE/LC_MESSAGES/deformsite.po b/tests/pkgs/localeapp/locale/de_DE/LC_MESSAGES/deformsite.po
index be055bed9..be055bed9 100644
--- a/pyramid/tests/pkgs/localeapp/locale/de_DE/LC_MESSAGES/deformsite.po
+++ b/tests/pkgs/localeapp/locale/de_DE/LC_MESSAGES/deformsite.po
diff --git a/pyramid/tests/pkgs/localeapp/locale/en/LC_MESSAGES/deformsite.mo b/tests/pkgs/localeapp/locale/en/LC_MESSAGES/deformsite.mo
index 2924a5eb5..2924a5eb5 100644
--- a/pyramid/tests/pkgs/localeapp/locale/en/LC_MESSAGES/deformsite.mo
+++ b/tests/pkgs/localeapp/locale/en/LC_MESSAGES/deformsite.mo
Binary files differ
diff --git a/pyramid/tests/pkgs/localeapp/locale/en/LC_MESSAGES/deformsite.po b/tests/pkgs/localeapp/locale/en/LC_MESSAGES/deformsite.po
index 17f87bc19..17f87bc19 100644
--- a/pyramid/tests/pkgs/localeapp/locale/en/LC_MESSAGES/deformsite.po
+++ b/tests/pkgs/localeapp/locale/en/LC_MESSAGES/deformsite.po
diff --git a/pyramid/tests/pkgs/localeapp/locale2/GARBAGE b/tests/pkgs/localeapp/locale2/GARBAGE
index 032c55584..032c55584 100644
--- a/pyramid/tests/pkgs/localeapp/locale2/GARBAGE
+++ b/tests/pkgs/localeapp/locale2/GARBAGE
diff --git a/pyramid/tests/pkgs/localeapp/locale2/be/LC_MESSAGES b/tests/pkgs/localeapp/locale2/be/LC_MESSAGES
index 909cf6a3b..909cf6a3b 100644
--- a/pyramid/tests/pkgs/localeapp/locale2/be/LC_MESSAGES
+++ b/tests/pkgs/localeapp/locale2/be/LC_MESSAGES
diff --git a/pyramid/tests/pkgs/localeapp/locale2/de/LC_MESSAGES/deformsite.mo b/tests/pkgs/localeapp/locale2/de/LC_MESSAGES/deformsite.mo
index 2924a5eb5..2924a5eb5 100644
--- a/pyramid/tests/pkgs/localeapp/locale2/de/LC_MESSAGES/deformsite.mo
+++ b/tests/pkgs/localeapp/locale2/de/LC_MESSAGES/deformsite.mo
Binary files differ
diff --git a/pyramid/tests/pkgs/localeapp/locale2/de/LC_MESSAGES/deformsite.po b/tests/pkgs/localeapp/locale2/de/LC_MESSAGES/deformsite.po
index 17f87bc19..17f87bc19 100644
--- a/pyramid/tests/pkgs/localeapp/locale2/de/LC_MESSAGES/deformsite.po
+++ b/tests/pkgs/localeapp/locale2/de/LC_MESSAGES/deformsite.po
diff --git a/pyramid/tests/pkgs/localeapp/locale2/en/LC_MESSAGES/deformsite.mo b/tests/pkgs/localeapp/locale2/en/LC_MESSAGES/deformsite.mo
index 2924a5eb5..2924a5eb5 100644
--- a/pyramid/tests/pkgs/localeapp/locale2/en/LC_MESSAGES/deformsite.mo
+++ b/tests/pkgs/localeapp/locale2/en/LC_MESSAGES/deformsite.mo
Binary files differ
diff --git a/pyramid/tests/pkgs/localeapp/locale2/en/LC_MESSAGES/deformsite.po b/tests/pkgs/localeapp/locale2/en/LC_MESSAGES/deformsite.po
index 17f87bc19..17f87bc19 100644
--- a/pyramid/tests/pkgs/localeapp/locale2/en/LC_MESSAGES/deformsite.po
+++ b/tests/pkgs/localeapp/locale2/en/LC_MESSAGES/deformsite.po
diff --git a/pyramid/tests/pkgs/localeapp/locale3/GARBAGE b/tests/pkgs/localeapp/locale3/GARBAGE
index 032c55584..032c55584 100644
--- a/pyramid/tests/pkgs/localeapp/locale3/GARBAGE
+++ b/tests/pkgs/localeapp/locale3/GARBAGE
diff --git a/pyramid/tests/pkgs/localeapp/locale3/be/LC_MESSAGES b/tests/pkgs/localeapp/locale3/be/LC_MESSAGES
index 909cf6a3b..909cf6a3b 100644
--- a/pyramid/tests/pkgs/localeapp/locale3/be/LC_MESSAGES
+++ b/tests/pkgs/localeapp/locale3/be/LC_MESSAGES
diff --git a/pyramid/tests/pkgs/localeapp/locale3/de/LC_MESSAGES/deformsite.mo b/tests/pkgs/localeapp/locale3/de/LC_MESSAGES/deformsite.mo
index 2924a5eb5..2924a5eb5 100644
--- a/pyramid/tests/pkgs/localeapp/locale3/de/LC_MESSAGES/deformsite.mo
+++ b/tests/pkgs/localeapp/locale3/de/LC_MESSAGES/deformsite.mo
Binary files differ
diff --git a/pyramid/tests/pkgs/localeapp/locale3/de/LC_MESSAGES/deformsite.po b/tests/pkgs/localeapp/locale3/de/LC_MESSAGES/deformsite.po
index 17f87bc19..17f87bc19 100644
--- a/pyramid/tests/pkgs/localeapp/locale3/de/LC_MESSAGES/deformsite.po
+++ b/tests/pkgs/localeapp/locale3/de/LC_MESSAGES/deformsite.po
diff --git a/pyramid/tests/pkgs/localeapp/locale3/en/LC_MESSAGES/deformsite.mo b/tests/pkgs/localeapp/locale3/en/LC_MESSAGES/deformsite.mo
index 2924a5eb5..2924a5eb5 100644
--- a/pyramid/tests/pkgs/localeapp/locale3/en/LC_MESSAGES/deformsite.mo
+++ b/tests/pkgs/localeapp/locale3/en/LC_MESSAGES/deformsite.mo
Binary files differ
diff --git a/pyramid/tests/pkgs/localeapp/locale3/en/LC_MESSAGES/deformsite.po b/tests/pkgs/localeapp/locale3/en/LC_MESSAGES/deformsite.po
index 17f87bc19..17f87bc19 100644
--- a/pyramid/tests/pkgs/localeapp/locale3/en/LC_MESSAGES/deformsite.po
+++ b/tests/pkgs/localeapp/locale3/en/LC_MESSAGES/deformsite.po
diff --git a/pyramid/tests/pkgs/notfoundview/__init__.py b/tests/pkgs/notfoundview/__init__.py
index ae148ea8c..8ba3ff9ed 100644
--- a/pyramid/tests/pkgs/notfoundview/__init__.py
+++ b/tests/pkgs/notfoundview/__init__.py
@@ -26,5 +26,5 @@ def includeme(config):
config.add_route('foo2', '/foo/')
config.add_route('bar', '/bar/')
config.add_route('baz', '/baz')
- config.scan('pyramid.tests.pkgs.notfoundview')
+ config.scan('tests.pkgs.notfoundview')
diff --git a/pyramid/tests/pkgs/permbugapp/__init__.py b/tests/pkgs/permbugapp/__init__.py
index 4868427a5..4868427a5 100644
--- a/pyramid/tests/pkgs/permbugapp/__init__.py
+++ b/tests/pkgs/permbugapp/__init__.py
diff --git a/pyramid/tests/pkgs/rendererscanapp/__init__.py b/tests/pkgs/rendererscanapp/__init__.py
index f3276a063..f3276a063 100644
--- a/pyramid/tests/pkgs/rendererscanapp/__init__.py
+++ b/tests/pkgs/rendererscanapp/__init__.py
diff --git a/pyramid/tests/pkgs/rendererscanapp/two/__init__.py b/tests/pkgs/rendererscanapp/two/__init__.py
index 6f575dd83..6f575dd83 100644
--- a/pyramid/tests/pkgs/rendererscanapp/two/__init__.py
+++ b/tests/pkgs/rendererscanapp/two/__init__.py
diff --git a/pyramid/tests/pkgs/restbugapp/__init__.py b/tests/pkgs/restbugapp/__init__.py
index 9ad79e32e..9ad79e32e 100644
--- a/pyramid/tests/pkgs/restbugapp/__init__.py
+++ b/tests/pkgs/restbugapp/__init__.py
diff --git a/pyramid/tests/pkgs/restbugapp/views.py b/tests/pkgs/restbugapp/views.py
index 2ace59fa9..2ace59fa9 100644
--- a/pyramid/tests/pkgs/restbugapp/views.py
+++ b/tests/pkgs/restbugapp/views.py
diff --git a/pyramid/tests/pkgs/static_abspath/__init__.py b/tests/pkgs/static_abspath/__init__.py
index 812cca467..812cca467 100644
--- a/pyramid/tests/pkgs/static_abspath/__init__.py
+++ b/tests/pkgs/static_abspath/__init__.py
diff --git a/tests/pkgs/static_assetspec/__init__.py b/tests/pkgs/static_assetspec/__init__.py
new file mode 100644
index 000000000..dcb438aff
--- /dev/null
+++ b/tests/pkgs/static_assetspec/__init__.py
@@ -0,0 +1,3 @@
+def includeme(config):
+ config.add_static_view('/', 'tests:fixtures')
+
diff --git a/tests/pkgs/static_routeprefix/__init__.py b/tests/pkgs/static_routeprefix/__init__.py
new file mode 100644
index 000000000..6a3a80712
--- /dev/null
+++ b/tests/pkgs/static_routeprefix/__init__.py
@@ -0,0 +1,7 @@
+def includeme(config):
+ config.add_static_view('/static', 'tests:fixtures')
+ config.include(includeme2, route_prefix='/prefix')
+
+def includeme2(config):
+ config.add_static_view('/static', 'tests:fixtures/static')
+
diff --git a/pyramid/tests/pkgs/staticpermapp/__init__.py b/tests/pkgs/staticpermapp/__init__.py
index cc690d937..b5038260f 100644
--- a/pyramid/tests/pkgs/staticpermapp/__init__.py
+++ b/tests/pkgs/staticpermapp/__init__.py
@@ -16,10 +16,10 @@ def includeme(config):
authz_policy = ACLAuthorizationPolicy()
config._set_authentication_policy(authn_policy)
config._set_authorization_policy(authz_policy)
- config.add_static_view('allowed', 'pyramid.tests:fixtures/static/')
- config.add_static_view('protected', 'pyramid.tests:fixtures/static/',
+ config.add_static_view('allowed', 'tests:fixtures/static/')
+ config.add_static_view('protected', 'tests:fixtures/static/',
permission='view')
config.add_static_view('factory_protected',
- 'pyramid.tests:fixtures/static/',
+ 'tests:fixtures/static/',
permission='view',
factory=LocalRootFactory)
diff --git a/pyramid/tests/pkgs/subrequestapp/__init__.py b/tests/pkgs/subrequestapp/__init__.py
index e4b1d386a..e4b1d386a 100644
--- a/pyramid/tests/pkgs/subrequestapp/__init__.py
+++ b/tests/pkgs/subrequestapp/__init__.py
diff --git a/tests/pkgs/viewdecoratorapp/__init__.py b/tests/pkgs/viewdecoratorapp/__init__.py
new file mode 100644
index 000000000..099bd29d5
--- /dev/null
+++ b/tests/pkgs/viewdecoratorapp/__init__.py
@@ -0,0 +1,3 @@
+def includeme(config):
+ config.scan('tests.pkgs.viewdecoratorapp')
+
diff --git a/pyramid/tests/pkgs/viewdecoratorapp/views/__init__.py b/tests/pkgs/viewdecoratorapp/views/__init__.py
index 5bb534f79..5bb534f79 100644
--- a/pyramid/tests/pkgs/viewdecoratorapp/views/__init__.py
+++ b/tests/pkgs/viewdecoratorapp/views/__init__.py
diff --git a/pyramid/tests/pkgs/viewdecoratorapp/views/views.py b/tests/pkgs/viewdecoratorapp/views/views.py
index 18ec78847..18ec78847 100644
--- a/pyramid/tests/pkgs/viewdecoratorapp/views/views.py
+++ b/tests/pkgs/viewdecoratorapp/views/views.py
diff --git a/pyramid/tests/pkgs/wsgiapp2app/__init__.py b/tests/pkgs/wsgiapp2app/__init__.py
index e2024198e..e2024198e 100644
--- a/pyramid/tests/pkgs/wsgiapp2app/__init__.py
+++ b/tests/pkgs/wsgiapp2app/__init__.py
diff --git a/pyramid/tests/test_asset.py b/tests/test_asset.py
index d3ebd5f7d..cddeb48df 100644
--- a/pyramid/tests/test_asset.py
+++ b/tests/test_asset.py
@@ -14,14 +14,14 @@ class Test_resolve_asset_spec(unittest.TestCase):
self.assertEqual(package_name, None)
def test_rel_spec(self):
- pkg = 'pyramid.tests'
+ pkg = 'tests'
path = 'test_asset.py'
package_name, filename = self._callFUT(path, pkg)
- self.assertEqual(package_name, 'pyramid.tests')
+ self.assertEqual(package_name, 'tests')
self.assertEqual(filename, 'test_asset.py')
def test_abs_spec(self):
- pkg = 'pyramid.tests'
+ pkg = 'tests'
path = 'pyramid.nottests:test_asset.py'
package_name, filename = self._callFUT(path, pkg)
self.assertEqual(package_name, 'pyramid.nottests')
@@ -35,11 +35,11 @@ class Test_resolve_asset_spec(unittest.TestCase):
self.assertEqual(filename, 'test_asset.py')
def test_package_name_is_package_object(self):
- import pyramid.tests
- pkg = pyramid.tests
+ import tests
+ pkg = tests
path = 'test_asset.py'
package_name, filename = self._callFUT(path, pkg)
- self.assertEqual(package_name, 'pyramid.tests')
+ self.assertEqual(package_name, 'tests')
self.assertEqual(filename, 'test_asset.py')
@@ -57,7 +57,7 @@ class Test_abspath_from_asset_spec(unittest.TestCase):
self.assertEqual(result, '/abc')
def test_pkgrelative(self):
- result = self._callFUT('abc', 'pyramid.tests')
+ result = self._callFUT('abc', 'tests')
self.assertEqual(result, os.path.join(here, 'abc'))
class Test_asset_spec_from_abspath(unittest.TestCase):
@@ -72,13 +72,13 @@ class Test_asset_spec_from_abspath(unittest.TestCase):
def test_abspath_startswith_package_path(self):
abspath = os.path.join(here, 'fixtureapp')
- pkg = DummyPackage('pyramid.tests')
+ pkg = DummyPackage('tests')
pkg.__file__ = 'file'
result = self._callFUT(abspath, pkg)
- self.assertEqual(result, 'pyramid:fixtureapp')
+ self.assertEqual(result, 'tests:fixtureapp')
def test_abspath_doesnt_startwith_package_path(self):
- pkg = DummyPackage('pyramid.tests')
+ pkg = DummyPackage('tests')
result = self._callFUT(here, pkg)
self.assertEqual(result, here)
diff --git a/pyramid/tests/test_authentication.py b/tests/test_authentication.py
index 4efd76f2b..4fbc3fe2e 100644
--- a/pyramid/tests/test_authentication.py
+++ b/tests/test_authentication.py
@@ -36,7 +36,7 @@ class TestCallbackAuthenticationPolicyDebugging(unittest.TestCase):
self.assertEqual(len(self.messages), 1)
self.assertEqual(
self.messages[0],
- 'pyramid.tests.test_authentication.MyAuthenticationPolicy.'
+ 'tests.test_authentication.MyAuthenticationPolicy.'
'authenticated_userid: call to unauthenticated_userid returned '
'None; returning None')
@@ -47,7 +47,7 @@ class TestCallbackAuthenticationPolicyDebugging(unittest.TestCase):
self.assertEqual(len(self.messages), 1)
self.assertEqual(
self.messages[0],
- "pyramid.tests.test_authentication.MyAuthenticationPolicy."
+ "tests.test_authentication.MyAuthenticationPolicy."
"authenticated_userid: there was no groupfinder callback; "
"returning 'fred'")
@@ -60,7 +60,7 @@ class TestCallbackAuthenticationPolicyDebugging(unittest.TestCase):
self.assertEqual(len(self.messages), 1)
self.assertEqual(
self.messages[0],
- 'pyramid.tests.test_authentication.MyAuthenticationPolicy.'
+ 'tests.test_authentication.MyAuthenticationPolicy.'
'authenticated_userid: groupfinder callback returned None; '
'returning None')
@@ -73,7 +73,7 @@ class TestCallbackAuthenticationPolicyDebugging(unittest.TestCase):
self.assertEqual(len(self.messages), 1)
self.assertEqual(
self.messages[0],
- "pyramid.tests.test_authentication.MyAuthenticationPolicy."
+ "tests.test_authentication.MyAuthenticationPolicy."
"authenticated_userid: groupfinder callback returned []; "
"returning 'fred'")
@@ -84,7 +84,7 @@ class TestCallbackAuthenticationPolicyDebugging(unittest.TestCase):
self.assertEqual(len(self.messages), 1)
self.assertEqual(
self.messages[0],
- "pyramid.tests.test_authentication.MyAuthenticationPolicy."
+ "tests.test_authentication.MyAuthenticationPolicy."
"authenticated_userid: use of userid 'system.Authenticated' is "
"disallowed by any built-in Pyramid security policy, returning "
"None")
@@ -96,7 +96,7 @@ class TestCallbackAuthenticationPolicyDebugging(unittest.TestCase):
self.assertEqual(len(self.messages), 1)
self.assertEqual(
self.messages[0],
- "pyramid.tests.test_authentication.MyAuthenticationPolicy."
+ "tests.test_authentication.MyAuthenticationPolicy."
"authenticated_userid: use of userid 'system.Everyone' is "
"disallowed by any built-in Pyramid security policy, returning "
"None")
@@ -109,7 +109,7 @@ class TestCallbackAuthenticationPolicyDebugging(unittest.TestCase):
self.assertEqual(len(self.messages), 1)
self.assertEqual(
self.messages[0],
- "pyramid.tests.test_authentication.MyAuthenticationPolicy."
+ "tests.test_authentication.MyAuthenticationPolicy."
"effective_principals: unauthenticated_userid returned None; "
"returning ['system.Everyone']")
@@ -122,12 +122,12 @@ class TestCallbackAuthenticationPolicyDebugging(unittest.TestCase):
self.assertEqual(len(self.messages), 2)
self.assertEqual(
self.messages[0],
- 'pyramid.tests.test_authentication.MyAuthenticationPolicy.'
+ 'tests.test_authentication.MyAuthenticationPolicy.'
'effective_principals: groupfinder callback is None, so groups '
'is []')
self.assertEqual(
self.messages[1],
- "pyramid.tests.test_authentication.MyAuthenticationPolicy."
+ "tests.test_authentication.MyAuthenticationPolicy."
"effective_principals: returning effective principals: "
"['system.Everyone', 'system.Authenticated', 'fred']")
@@ -141,12 +141,12 @@ class TestCallbackAuthenticationPolicyDebugging(unittest.TestCase):
self.assertEqual(len(self.messages), 2)
self.assertEqual(
self.messages[0],
- 'pyramid.tests.test_authentication.MyAuthenticationPolicy.'
+ 'tests.test_authentication.MyAuthenticationPolicy.'
'effective_principals: groupfinder callback returned None as '
'groups')
self.assertEqual(
self.messages[1],
- "pyramid.tests.test_authentication.MyAuthenticationPolicy."
+ "tests.test_authentication.MyAuthenticationPolicy."
"effective_principals: returning effective principals: "
"['system.Everyone']")
@@ -161,11 +161,11 @@ class TestCallbackAuthenticationPolicyDebugging(unittest.TestCase):
self.assertEqual(len(self.messages), 2)
self.assertEqual(
self.messages[0],
- 'pyramid.tests.test_authentication.MyAuthenticationPolicy.'
+ 'tests.test_authentication.MyAuthenticationPolicy.'
'effective_principals: groupfinder callback returned [] as groups')
self.assertEqual(
self.messages[1],
- "pyramid.tests.test_authentication.MyAuthenticationPolicy."
+ "tests.test_authentication.MyAuthenticationPolicy."
"effective_principals: returning effective principals: "
"['system.Everyone', 'system.Authenticated', 'fred']")
@@ -178,7 +178,7 @@ class TestCallbackAuthenticationPolicyDebugging(unittest.TestCase):
self.assertEqual(len(self.messages), 1)
self.assertEqual(
self.messages[0],
- "pyramid.tests.test_authentication.MyAuthenticationPolicy."
+ "tests.test_authentication.MyAuthenticationPolicy."
"effective_principals: unauthenticated_userid returned disallowed "
"'system.Authenticated'; returning ['system.Everyone'] as if it "
"was None")
@@ -192,7 +192,7 @@ class TestCallbackAuthenticationPolicyDebugging(unittest.TestCase):
self.assertEqual(len(self.messages), 1)
self.assertEqual(
self.messages[0],
- "pyramid.tests.test_authentication.MyAuthenticationPolicy."
+ "tests.test_authentication.MyAuthenticationPolicy."
"effective_principals: unauthenticated_userid returned disallowed "
"'system.Everyone'; returning ['system.Everyone'] as if it "
"was None")
diff --git a/pyramid/tests/test_authorization.py b/tests/test_authorization.py
index 05cd3b4f8..05cd3b4f8 100644
--- a/pyramid/tests/test_authorization.py
+++ b/tests/test_authorization.py
diff --git a/pyramid/tests/test_compat.py b/tests/test_compat.py
index 23ccce82e..23ccce82e 100644
--- a/pyramid/tests/test_compat.py
+++ b/tests/test_compat.py
diff --git a/pyramid/tests/test_config/__init__.py b/tests/test_config/__init__.py
index 81d9f4965..81d9f4965 100644
--- a/pyramid/tests/test_config/__init__.py
+++ b/tests/test_config/__init__.py
diff --git a/pyramid/tests/test_config/files/assets/dummy.txt b/tests/test_config/files/assets/dummy.txt
index 18832d351..18832d351 100644
--- a/pyramid/tests/test_config/files/assets/dummy.txt
+++ b/tests/test_config/files/assets/dummy.txt
diff --git a/pyramid/tests/test_config/files/minimal.txt b/tests/test_config/files/minimal.txt
index 19fe66dfa..19fe66dfa 100644
--- a/pyramid/tests/test_config/files/minimal.txt
+++ b/tests/test_config/files/minimal.txt
diff --git a/pyramid/tests/test_config/path/scanerror/__init__.py b/tests/test_config/path/scanerror/__init__.py
index 86770ad89..86770ad89 100644
--- a/pyramid/tests/test_config/path/scanerror/__init__.py
+++ b/tests/test_config/path/scanerror/__init__.py
diff --git a/pyramid/tests/test_config/path/scanerror/will_raise_error.py b/tests/test_config/path/scanerror/will_raise_error.py
index 9098ff1fe..9098ff1fe 100644
--- a/pyramid/tests/test_config/path/scanerror/will_raise_error.py
+++ b/tests/test_config/path/scanerror/will_raise_error.py
diff --git a/pyramid/tests/test_config/pkgs/__init__.py b/tests/test_config/pkgs/__init__.py
index ed88d78b4..ed88d78b4 100644
--- a/pyramid/tests/test_config/pkgs/__init__.py
+++ b/tests/test_config/pkgs/__init__.py
diff --git a/pyramid/tests/test_config/pkgs/asset/__init__.py b/tests/test_config/pkgs/asset/__init__.py
index db5619fbc..db5619fbc 100644
--- a/pyramid/tests/test_config/pkgs/asset/__init__.py
+++ b/tests/test_config/pkgs/asset/__init__.py
diff --git a/pyramid/tests/test_config/pkgs/asset/subpackage/__init__.py b/tests/test_config/pkgs/asset/subpackage/__init__.py
index d3173e636..d3173e636 100644
--- a/pyramid/tests/test_config/pkgs/asset/subpackage/__init__.py
+++ b/tests/test_config/pkgs/asset/subpackage/__init__.py
diff --git a/pyramid/tests/test_config/pkgs/asset/subpackage/templates/bar.pt b/tests/test_config/pkgs/asset/subpackage/templates/bar.pt
index e69de29bb..e69de29bb 100644
--- a/pyramid/tests/test_config/pkgs/asset/subpackage/templates/bar.pt
+++ b/tests/test_config/pkgs/asset/subpackage/templates/bar.pt
diff --git a/pyramid/tests/test_config/pkgs/scanextrakw/__init__.py b/tests/test_config/pkgs/scanextrakw/__init__.py
index ce5e07238..ce5e07238 100644
--- a/pyramid/tests/test_config/pkgs/scanextrakw/__init__.py
+++ b/tests/test_config/pkgs/scanextrakw/__init__.py
diff --git a/pyramid/tests/test_config/pkgs/scannable/__init__.py b/tests/test_config/pkgs/scannable/__init__.py
index 562413a41..562413a41 100644
--- a/pyramid/tests/test_config/pkgs/scannable/__init__.py
+++ b/tests/test_config/pkgs/scannable/__init__.py
diff --git a/pyramid/tests/test_config/pkgs/scannable/another.py b/tests/test_config/pkgs/scannable/another.py
index 529821b5c..529821b5c 100644
--- a/pyramid/tests/test_config/pkgs/scannable/another.py
+++ b/tests/test_config/pkgs/scannable/another.py
diff --git a/pyramid/tests/test_config/pkgs/scannable/pod/notinit.py b/tests/test_config/pkgs/scannable/pod/notinit.py
index 91dcd161b..91dcd161b 100644
--- a/pyramid/tests/test_config/pkgs/scannable/pod/notinit.py
+++ b/tests/test_config/pkgs/scannable/pod/notinit.py
diff --git a/pyramid/tests/test_config/pkgs/scannable/subpackage/__init__.py b/tests/test_config/pkgs/scannable/subpackage/__init__.py
index 9e0ddacbd..9e0ddacbd 100644
--- a/pyramid/tests/test_config/pkgs/scannable/subpackage/__init__.py
+++ b/tests/test_config/pkgs/scannable/subpackage/__init__.py
diff --git a/pyramid/tests/test_config/pkgs/scannable/subpackage/notinit.py b/tests/test_config/pkgs/scannable/subpackage/notinit.py
index f7edd0c68..f7edd0c68 100644
--- a/pyramid/tests/test_config/pkgs/scannable/subpackage/notinit.py
+++ b/tests/test_config/pkgs/scannable/subpackage/notinit.py
diff --git a/pyramid/tests/test_config/pkgs/scannable/subpackage/subsubpackage/__init__.py b/tests/test_config/pkgs/scannable/subpackage/subsubpackage/__init__.py
index fdda0dffe..fdda0dffe 100644
--- a/pyramid/tests/test_config/pkgs/scannable/subpackage/subsubpackage/__init__.py
+++ b/tests/test_config/pkgs/scannable/subpackage/subsubpackage/__init__.py
diff --git a/pyramid/tests/test_config/pkgs/selfscan/__init__.py b/tests/test_config/pkgs/selfscan/__init__.py
index 779ea3eed..779ea3eed 100644
--- a/pyramid/tests/test_config/pkgs/selfscan/__init__.py
+++ b/tests/test_config/pkgs/selfscan/__init__.py
diff --git a/pyramid/tests/test_config/pkgs/selfscan/another.py b/tests/test_config/pkgs/selfscan/another.py
index a30ad3297..a30ad3297 100644
--- a/pyramid/tests/test_config/pkgs/selfscan/another.py
+++ b/tests/test_config/pkgs/selfscan/another.py
diff --git a/pyramid/tests/test_config/test_adapters.py b/tests/test_config/test_adapters.py
index ab5d6ef61..e554520e7 100644
--- a/pyramid/tests/test_config/test_adapters.py
+++ b/tests/test_config/test_adapters.py
@@ -1,7 +1,7 @@
import unittest
from pyramid.compat import PY2
-from pyramid.tests.test_config import IDummy
+from . import IDummy
class AdaptersConfiguratorMixinTests(unittest.TestCase):
def _makeOne(self, *arg, **kw):
@@ -50,15 +50,15 @@ class AdaptersConfiguratorMixinTests(unittest.TestCase):
self.assertEqual(len(L), 1)
def test_add_subscriber_dottednames(self):
- import pyramid.tests.test_config
+ import tests.test_config
from pyramid.interfaces import INewRequest
config = self._makeOne(autocommit=True)
- config.add_subscriber('pyramid.tests.test_config',
+ config.add_subscriber('tests.test_config',
'pyramid.interfaces.INewRequest')
handlers = list(config.registry.registeredHandlers())
self.assertEqual(len(handlers), 1)
handler = handlers[0]
- self.assertEqual(handler.handler, pyramid.tests.test_config)
+ self.assertEqual(handler.handler, tests.test_config)
self.assertEqual(handler.required, (INewRequest,))
def test_add_object_event_subscriber(self):
@@ -231,8 +231,8 @@ class AdaptersConfiguratorMixinTests(unittest.TestCase):
from pyramid.interfaces import ITraverser
config = self._makeOne(autocommit=True)
config.add_traverser(
- 'pyramid.tests.test_config.test_adapters.DummyTraverser',
- 'pyramid.tests.test_config.test_adapters.DummyIface')
+ 'tests.test_config.test_adapters.DummyTraverser',
+ 'tests.test_config.test_adapters.DummyIface')
iface = DummyIface()
traverser = config.registry.getAdapter(iface, ITraverser)
self.assertEqual(traverser.__class__, DummyTraverser)
@@ -273,8 +273,8 @@ class AdaptersConfiguratorMixinTests(unittest.TestCase):
from pyramid.interfaces import IResourceURL
config = self._makeOne(autocommit=True)
config.add_resource_url_adapter(
- 'pyramid.tests.test_config.test_adapters.DummyResourceURL',
- 'pyramid.tests.test_config.test_adapters.DummyIface',
+ 'tests.test_config.test_adapters.DummyResourceURL',
+ 'tests.test_config.test_adapters.DummyIface',
)
iface = DummyIface()
adapter = config.registry.getMultiAdapter((iface, iface),
@@ -326,7 +326,7 @@ class AdaptersConfiguratorMixinTests(unittest.TestCase):
self.assertEqual(
intr.title,
"resource url adapter for resource iface "
- "<class 'pyramid.tests.test_config.test_adapters.DummyIface'>"
+ "<class 'tests.test_config.test_adapters.DummyIface'>"
)
self.assertEqual(intr['adapter'], DummyResourceURL)
self.assertEqual(intr['resource_iface'], DummyIface)
diff --git a/pyramid/tests/test_config/test_assets.py b/tests/test_config/test_assets.py
index 842c73da6..b16977b99 100644
--- a/pyramid/tests/test_config/test_assets.py
+++ b/tests/test_config/test_assets.py
@@ -21,32 +21,32 @@ class TestAssetsConfiguratorMixin(unittest.TestCase):
config = self._makeOne()
self.assertRaises(ConfigurationError, config.override_asset,
'a:foo/',
- 'pyramid.tests.test_config.pkgs.asset:foo.pt')
+ 'tests.test_config.pkgs.asset:foo.pt')
def test_override_asset_file_with_directory(self):
from pyramid.exceptions import ConfigurationError
config = self._makeOne()
self.assertRaises(ConfigurationError, config.override_asset,
'a:foo.pt',
- 'pyramid.tests.test_config.pkgs.asset:templates/')
+ 'tests.test_config.pkgs.asset:templates/')
def test_override_asset_file_with_package(self):
from pyramid.exceptions import ConfigurationError
config = self._makeOne()
self.assertRaises(ConfigurationError, config.override_asset,
'a:foo.pt',
- 'pyramid.tests.test_config.pkgs.asset')
+ 'tests.test_config.pkgs.asset')
def test_override_asset_file_with_file(self):
from pyramid.config.assets import PackageAssetSource
config = self._makeOne(autocommit=True)
override = DummyUnderOverride()
config.override_asset(
- 'pyramid.tests.test_config.pkgs.asset:templates/foo.pt',
- 'pyramid.tests.test_config.pkgs.asset.subpackage:templates/bar.pt',
+ 'tests.test_config.pkgs.asset:templates/foo.pt',
+ 'tests.test_config.pkgs.asset.subpackage:templates/bar.pt',
_override=override)
- from pyramid.tests.test_config.pkgs import asset
- from pyramid.tests.test_config.pkgs.asset import subpackage
+ from tests.test_config.pkgs import asset
+ from tests.test_config.pkgs.asset import subpackage
self.assertEqual(override.package, asset)
self.assertEqual(override.path, 'templates/foo.pt')
source = override.source
@@ -65,11 +65,11 @@ class TestAssetsConfiguratorMixin(unittest.TestCase):
config = self._makeOne(autocommit=True)
override = DummyUnderOverride()
config.override_asset(
- 'pyramid.tests.test_config.pkgs.asset',
- 'pyramid.tests.test_config.pkgs.asset.subpackage',
+ 'tests.test_config.pkgs.asset',
+ 'tests.test_config.pkgs.asset.subpackage',
_override=override)
- from pyramid.tests.test_config.pkgs import asset
- from pyramid.tests.test_config.pkgs.asset import subpackage
+ from tests.test_config.pkgs import asset
+ from tests.test_config.pkgs.asset import subpackage
self.assertEqual(override.package, asset)
self.assertEqual(override.path, '')
source = override.source
@@ -88,11 +88,11 @@ class TestAssetsConfiguratorMixin(unittest.TestCase):
config = self._makeOne(autocommit=True)
override = DummyUnderOverride()
config.override_asset(
- 'pyramid.tests.test_config.pkgs.asset:templates/',
- 'pyramid.tests.test_config.pkgs.asset.subpackage:templates/',
+ 'tests.test_config.pkgs.asset:templates/',
+ 'tests.test_config.pkgs.asset.subpackage:templates/',
_override=override)
- from pyramid.tests.test_config.pkgs import asset
- from pyramid.tests.test_config.pkgs.asset import subpackage
+ from tests.test_config.pkgs import asset
+ from tests.test_config.pkgs.asset import subpackage
self.assertEqual(override.package, asset)
self.assertEqual(override.path, 'templates/')
source = override.source
@@ -111,11 +111,11 @@ class TestAssetsConfiguratorMixin(unittest.TestCase):
config = self._makeOne(autocommit=True)
override = DummyUnderOverride()
config.override_asset(
- 'pyramid.tests.test_config.pkgs.asset:templates/',
- 'pyramid.tests.test_config.pkgs.asset.subpackage',
+ 'tests.test_config.pkgs.asset:templates/',
+ 'tests.test_config.pkgs.asset.subpackage',
_override=override)
- from pyramid.tests.test_config.pkgs import asset
- from pyramid.tests.test_config.pkgs.asset import subpackage
+ from tests.test_config.pkgs import asset
+ from tests.test_config.pkgs.asset import subpackage
self.assertEqual(override.package, asset)
self.assertEqual(override.path, 'templates/')
source = override.source
@@ -134,11 +134,11 @@ class TestAssetsConfiguratorMixin(unittest.TestCase):
config = self._makeOne(autocommit=True)
override = DummyUnderOverride()
config.override_asset(
- 'pyramid.tests.test_config.pkgs.asset',
- 'pyramid.tests.test_config.pkgs.asset.subpackage:templates/',
+ 'tests.test_config.pkgs.asset',
+ 'tests.test_config.pkgs.asset.subpackage:templates/',
_override=override)
- from pyramid.tests.test_config.pkgs import asset
- from pyramid.tests.test_config.pkgs.asset import subpackage
+ from tests.test_config.pkgs import asset
+ from tests.test_config.pkgs.asset import subpackage
self.assertEqual(override.package, asset)
self.assertEqual(override.path, '')
source = override.source
@@ -181,10 +181,10 @@ class TestAssetsConfiguratorMixin(unittest.TestCase):
abspath = os.path.join(here, 'pkgs', 'asset', 'subpackage',
'templates', 'bar.pt')
config.override_asset(
- 'pyramid.tests.test_config.pkgs.asset:templates/foo.pt',
+ 'tests.test_config.pkgs.asset:templates/foo.pt',
abspath,
_override=override)
- from pyramid.tests.test_config.pkgs import asset
+ from tests.test_config.pkgs import asset
self.assertEqual(override.package, asset)
self.assertEqual(override.path, 'templates/foo.pt')
source = override.source
@@ -203,10 +203,10 @@ class TestAssetsConfiguratorMixin(unittest.TestCase):
override = DummyUnderOverride()
abspath = os.path.join(here, 'pkgs', 'asset', 'subpackage', 'templates')
config.override_asset(
- 'pyramid.tests.test_config.pkgs.asset:templates/',
+ 'tests.test_config.pkgs.asset:templates/',
abspath,
_override=override)
- from pyramid.tests.test_config.pkgs import asset
+ from tests.test_config.pkgs import asset
self.assertEqual(override.package, asset)
self.assertEqual(override.path, 'templates/')
source = override.source
@@ -225,10 +225,10 @@ class TestAssetsConfiguratorMixin(unittest.TestCase):
override = DummyUnderOverride()
abspath = os.path.join(here, 'pkgs', 'asset', 'subpackage', 'templates')
config.override_asset(
- 'pyramid.tests.test_config.pkgs.asset',
+ 'tests.test_config.pkgs.asset',
abspath,
_override=override)
- from pyramid.tests.test_config.pkgs import asset
+ from tests.test_config.pkgs import asset
self.assertEqual(override.package, asset)
self.assertEqual(override.path, '')
source = override.source
@@ -282,7 +282,7 @@ class TestOverrideProvider(unittest.TestCase):
klass = self._getTargetClass()
return klass(module)
- def _registerOverrides(self, overrides, name='pyramid.tests.test_config'):
+ def _registerOverrides(self, overrides, name='tests.test_config'):
from pyramid.interfaces import IPackageOverrides
from pyramid.threadlocal import get_current_registry
reg = get_current_registry()
@@ -290,38 +290,38 @@ class TestOverrideProvider(unittest.TestCase):
def test_get_resource_filename_no_overrides(self):
resource_name = 'test_assets.py'
- import pyramid.tests.test_config
- provider = self._makeOne(pyramid.tests.test_config)
+ import tests.test_config
+ provider = self._makeOne(tests.test_config)
expected = os.path.join(here, resource_name)
result = provider.get_resource_filename(None, resource_name)
self.assertEqual(result, expected)
def test_get_resource_stream_no_overrides(self):
resource_name = 'test_assets.py'
- import pyramid.tests.test_config
- provider = self._makeOne(pyramid.tests.test_config)
+ import tests.test_config
+ provider = self._makeOne(tests.test_config)
with provider.get_resource_stream(None, resource_name) as result:
_assertBody(result.read(), os.path.join(here, resource_name))
def test_get_resource_string_no_overrides(self):
resource_name = 'test_assets.py'
- import pyramid.tests.test_config
- provider = self._makeOne(pyramid.tests.test_config)
+ import tests.test_config
+ provider = self._makeOne(tests.test_config)
result = provider.get_resource_string(None, resource_name)
_assertBody(result, os.path.join(here, resource_name))
def test_has_resource_no_overrides(self):
resource_name = 'test_assets.py'
- import pyramid.tests.test_config
- provider = self._makeOne(pyramid.tests.test_config)
+ import tests.test_config
+ provider = self._makeOne(tests.test_config)
result = provider.has_resource(resource_name)
self.assertEqual(result, True)
def test_resource_isdir_no_overrides(self):
file_resource_name = 'test_assets.py'
directory_resource_name = 'files'
- import pyramid.tests.test_config
- provider = self._makeOne(pyramid.tests.test_config)
+ import tests.test_config
+ provider = self._makeOne(tests.test_config)
result = provider.resource_isdir(file_resource_name)
self.assertEqual(result, False)
result = provider.resource_isdir(directory_resource_name)
@@ -329,8 +329,8 @@ class TestOverrideProvider(unittest.TestCase):
def test_resource_listdir_no_overrides(self):
resource_name = 'files'
- import pyramid.tests.test_config
- provider = self._makeOne(pyramid.tests.test_config)
+ import tests.test_config
+ provider = self._makeOne(tests.test_config)
result = provider.resource_listdir(resource_name)
self.assertTrue(result)
@@ -338,8 +338,8 @@ class TestOverrideProvider(unittest.TestCase):
overrides = DummyOverrides(None)
self._registerOverrides(overrides)
resource_name = 'test_assets.py'
- import pyramid.tests.test_config
- provider = self._makeOne(pyramid.tests.test_config)
+ import tests.test_config
+ provider = self._makeOne(tests.test_config)
expected = os.path.join(here, resource_name)
result = provider.get_resource_filename(None, resource_name)
self.assertEqual(result, expected)
@@ -348,8 +348,8 @@ class TestOverrideProvider(unittest.TestCase):
overrides = DummyOverrides(None)
self._registerOverrides(overrides)
resource_name = 'test_assets.py'
- import pyramid.tests.test_config
- provider = self._makeOne(pyramid.tests.test_config)
+ import tests.test_config
+ provider = self._makeOne(tests.test_config)
with provider.get_resource_stream(None, resource_name) as result:
_assertBody(result.read(), os.path.join(here, resource_name))
@@ -357,8 +357,8 @@ class TestOverrideProvider(unittest.TestCase):
overrides = DummyOverrides(None)
self._registerOverrides(overrides)
resource_name = 'test_assets.py'
- import pyramid.tests.test_config
- provider = self._makeOne(pyramid.tests.test_config)
+ import tests.test_config
+ provider = self._makeOne(tests.test_config)
result = provider.get_resource_string(None, resource_name)
_assertBody(result, os.path.join(here, resource_name))
@@ -366,8 +366,8 @@ class TestOverrideProvider(unittest.TestCase):
overrides = DummyOverrides(None)
self._registerOverrides(overrides)
resource_name = 'test_assets.py'
- import pyramid.tests.test_config
- provider = self._makeOne(pyramid.tests.test_config)
+ import tests.test_config
+ provider = self._makeOne(tests.test_config)
result = provider.has_resource(resource_name)
self.assertEqual(result, True)
@@ -375,8 +375,8 @@ class TestOverrideProvider(unittest.TestCase):
overrides = DummyOverrides(None)
self._registerOverrides(overrides)
resource_name = 'files'
- import pyramid.tests.test_config
- provider = self._makeOne(pyramid.tests.test_config)
+ import tests.test_config
+ provider = self._makeOne(tests.test_config)
result = provider.resource_isdir(resource_name)
self.assertEqual(result, True)
@@ -384,57 +384,57 @@ class TestOverrideProvider(unittest.TestCase):
overrides = DummyOverrides(None)
self._registerOverrides(overrides)
resource_name = 'files'
- import pyramid.tests.test_config
- provider = self._makeOne(pyramid.tests.test_config)
+ import tests.test_config
+ provider = self._makeOne(tests.test_config)
result = provider.resource_listdir(resource_name)
self.assertTrue(result)
def test_get_resource_filename_override_returns_value(self):
overrides = DummyOverrides('value')
- import pyramid.tests.test_config
+ import tests.test_config
self._registerOverrides(overrides)
- provider = self._makeOne(pyramid.tests.test_config)
+ provider = self._makeOne(tests.test_config)
result = provider.get_resource_filename(None, 'test_assets.py')
self.assertEqual(result, 'value')
def test_get_resource_stream_override_returns_value(self):
from io import BytesIO
overrides = DummyOverrides(BytesIO(b'value'))
- import pyramid.tests.test_config
+ import tests.test_config
self._registerOverrides(overrides)
- provider = self._makeOne(pyramid.tests.test_config)
+ provider = self._makeOne(tests.test_config)
with provider.get_resource_stream(None, 'test_assets.py') as stream:
self.assertEqual(stream.getvalue(), b'value')
def test_get_resource_string_override_returns_value(self):
overrides = DummyOverrides('value')
- import pyramid.tests.test_config
+ import tests.test_config
self._registerOverrides(overrides)
- provider = self._makeOne(pyramid.tests.test_config)
+ provider = self._makeOne(tests.test_config)
result = provider.get_resource_string(None, 'test_assets.py')
self.assertEqual(result, 'value')
def test_has_resource_override_returns_True(self):
overrides = DummyOverrides(True)
- import pyramid.tests.test_config
+ import tests.test_config
self._registerOverrides(overrides)
- provider = self._makeOne(pyramid.tests.test_config)
+ provider = self._makeOne(tests.test_config)
result = provider.has_resource('test_assets.py')
self.assertEqual(result, True)
def test_resource_isdir_override_returns_False(self):
overrides = DummyOverrides(False)
- import pyramid.tests.test_config
+ import tests.test_config
self._registerOverrides(overrides)
- provider = self._makeOne(pyramid.tests.test_config)
+ provider = self._makeOne(tests.test_config)
result = provider.resource_isdir('files')
self.assertEqual(result, False)
def test_resource_listdir_override_returns_values(self):
overrides = DummyOverrides(['a'])
- import pyramid.tests.test_config
+ import tests.test_config
self._registerOverrides(overrides)
- provider = self._makeOne(pyramid.tests.test_config)
+ provider = self._makeOne(tests.test_config)
result = provider.resource_listdir('files')
self.assertEqual(result, ['a'])
@@ -791,7 +791,7 @@ class TestPackageAssetSource(AssetSourceIntegrationTests, unittest.TestCase):
from pyramid.config.assets import PackageAssetSource
return PackageAssetSource
- def _makeOne(self, prefix, package='pyramid.tests.test_config'):
+ def _makeOne(self, prefix, package='tests.test_config'):
klass = self._getTargetClass()
return klass(package, prefix)
diff --git a/pyramid/tests/test_config/test_factories.py b/tests/test_config/test_factories.py
index 7e6ea0476..ea8dec720 100644
--- a/pyramid/tests/test_config/test_factories.py
+++ b/tests/test_config/test_factories.py
@@ -1,6 +1,6 @@
import unittest
-from pyramid.tests.test_config import dummyfactory
+from . import dummyfactory
class TestFactoriesMixin(unittest.TestCase):
def _makeOne(self, *arg, **kw):
@@ -19,7 +19,7 @@ class TestFactoriesMixin(unittest.TestCase):
from pyramid.interfaces import IRequestFactory
config = self._makeOne(autocommit=True)
config.set_request_factory(
- 'pyramid.tests.test_config.dummyfactory')
+ 'tests.test_config.dummyfactory')
self.assertEqual(config.registry.getUtility(IRequestFactory),
dummyfactory)
@@ -34,7 +34,7 @@ class TestFactoriesMixin(unittest.TestCase):
from pyramid.interfaces import IResponseFactory
config = self._makeOne(autocommit=True)
config.set_response_factory(
- 'pyramid.tests.test_config.dummyfactory')
+ 'tests.test_config.dummyfactory')
self.assertEqual(config.registry.getUtility(IResponseFactory),
dummyfactory)
@@ -59,7 +59,7 @@ class TestFactoriesMixin(unittest.TestCase):
def test_set_root_factory_dottedname(self):
from pyramid.interfaces import IRootFactory
config = self._makeOne()
- config.set_root_factory('pyramid.tests.test_config.dummyfactory')
+ config.set_root_factory('tests.test_config.dummyfactory')
self.assertEqual(config.registry.queryUtility(IRootFactory), None)
config.commit()
self.assertEqual(config.registry.getUtility(IRootFactory), dummyfactory)
@@ -76,7 +76,7 @@ class TestFactoriesMixin(unittest.TestCase):
def test_set_session_factory_dottedname(self):
from pyramid.interfaces import ISessionFactory
config = self._makeOne()
- config.set_session_factory('pyramid.tests.test_config.dummyfactory')
+ config.set_session_factory('tests.test_config.dummyfactory')
self.assertEqual(config.registry.queryUtility(ISessionFactory), None)
config.commit()
self.assertEqual(config.registry.getUtility(ISessionFactory),
diff --git a/pyramid/tests/test_config/test_i18n.py b/tests/test_config/test_i18n.py
index c10ab6bdb..87805f671 100644
--- a/pyramid/tests/test_config/test_i18n.py
+++ b/tests/test_config/test_i18n.py
@@ -1,7 +1,7 @@
import os
import unittest
-from pyramid.tests.test_config import dummyfactory
+from . import dummyfactory
here = os.path.dirname(__file__)
locale = os.path.abspath(
@@ -29,7 +29,7 @@ class TestI18NConfiguratorMixin(unittest.TestCase):
from pyramid.interfaces import ILocaleNegotiator
config = self._makeOne(autocommit=True)
config.set_locale_negotiator(
- 'pyramid.tests.test_config.dummyfactory')
+ 'tests.test_config.dummyfactory')
self.assertEqual(config.registry.getUtility(ILocaleNegotiator),
dummyfactory)
@@ -49,7 +49,7 @@ class TestI18NConfiguratorMixin(unittest.TestCase):
def test_add_translation_dirs_asset_spec(self):
from pyramid.interfaces import ITranslationDirectories
config = self._makeOne(autocommit=True)
- config.add_translation_dirs('pyramid.tests.pkgs.localeapp:locale')
+ config.add_translation_dirs('tests.pkgs.localeapp:locale')
self.assertEqual(config.registry.getUtility(ITranslationDirectories),
[locale])
@@ -58,33 +58,33 @@ class TestI18NConfiguratorMixin(unittest.TestCase):
config = self._makeOne(autocommit=True)
directories = ['abc']
config.registry.registerUtility(directories, ITranslationDirectories)
- config.add_translation_dirs('pyramid.tests.pkgs.localeapp:locale')
+ config.add_translation_dirs('tests.pkgs.localeapp:locale')
result = config.registry.getUtility(ITranslationDirectories)
self.assertEqual(result, [locale, 'abc'])
def test_add_translation_dirs_multiple_specs(self):
from pyramid.interfaces import ITranslationDirectories
config = self._makeOne(autocommit=True)
- config.add_translation_dirs('pyramid.tests.pkgs.localeapp:locale',
- 'pyramid.tests.pkgs.localeapp:locale2')
+ config.add_translation_dirs('tests.pkgs.localeapp:locale',
+ 'tests.pkgs.localeapp:locale2')
self.assertEqual(config.registry.getUtility(ITranslationDirectories),
[locale, locale2])
def test_add_translation_dirs_multiple_specs_multiple_calls(self):
from pyramid.interfaces import ITranslationDirectories
config = self._makeOne(autocommit=True)
- config.add_translation_dirs('pyramid.tests.pkgs.localeapp:locale',
- 'pyramid.tests.pkgs.localeapp:locale2')
- config.add_translation_dirs('pyramid.tests.pkgs.localeapp:locale3')
+ config.add_translation_dirs('tests.pkgs.localeapp:locale',
+ 'tests.pkgs.localeapp:locale2')
+ config.add_translation_dirs('tests.pkgs.localeapp:locale3')
self.assertEqual(config.registry.getUtility(ITranslationDirectories),
[locale3, locale, locale2])
def test_add_translation_dirs_override_multiple_specs_multiple_calls(self):
from pyramid.interfaces import ITranslationDirectories
config = self._makeOne(autocommit=True)
- config.add_translation_dirs('pyramid.tests.pkgs.localeapp:locale',
- 'pyramid.tests.pkgs.localeapp:locale2')
- config.add_translation_dirs('pyramid.tests.pkgs.localeapp:locale3',
+ config.add_translation_dirs('tests.pkgs.localeapp:locale',
+ 'tests.pkgs.localeapp:locale2')
+ config.add_translation_dirs('tests.pkgs.localeapp:locale3',
override=True)
self.assertEqual(config.registry.getUtility(ITranslationDirectories),
[locale, locale2, locale3])
@@ -93,7 +93,7 @@ class TestI18NConfiguratorMixin(unittest.TestCase):
from pyramid.interfaces import ITranslationDirectories
config = self._makeOne(autocommit=True)
with self.assertRaises(TypeError):
- config.add_translation_dirs('pyramid.tests.pkgs.localeapp:locale',
+ config.add_translation_dirs('tests.pkgs.localeapp:locale',
foo=1)
def test_add_translation_dirs_abspath(self):
@@ -106,9 +106,9 @@ class TestI18NConfiguratorMixin(unittest.TestCase):
def test_add_translation_dirs_uses_override_out_of_order(self):
from pyramid.interfaces import ITranslationDirectories
config = self._makeOne()
- config.add_translation_dirs('pyramid.tests.pkgs.localeapp:locale')
- config.override_asset('pyramid.tests.pkgs.localeapp:locale/',
- 'pyramid.tests.pkgs.localeapp:locale2/')
+ config.add_translation_dirs('tests.pkgs.localeapp:locale')
+ config.override_asset('tests.pkgs.localeapp:locale/',
+ 'tests.pkgs.localeapp:locale2/')
config.commit()
self.assertEqual(config.registry.getUtility(ITranslationDirectories),
[locale2])
@@ -116,17 +116,17 @@ class TestI18NConfiguratorMixin(unittest.TestCase):
def test_add_translation_dirs_doesnt_use_override_w_autocommit(self):
from pyramid.interfaces import ITranslationDirectories
config = self._makeOne(autocommit=True)
- config.add_translation_dirs('pyramid.tests.pkgs.localeapp:locale')
- config.override_asset('pyramid.tests.pkgs.localeapp:locale/',
- 'pyramid.tests.pkgs.localeapp:locale2/')
+ config.add_translation_dirs('tests.pkgs.localeapp:locale')
+ config.override_asset('tests.pkgs.localeapp:locale/',
+ 'tests.pkgs.localeapp:locale2/')
self.assertEqual(config.registry.getUtility(ITranslationDirectories),
[locale])
def test_add_translation_dirs_uses_override_w_autocommit(self):
from pyramid.interfaces import ITranslationDirectories
config = self._makeOne(autocommit=True)
- config.override_asset('pyramid.tests.pkgs.localeapp:locale/',
- 'pyramid.tests.pkgs.localeapp:locale2/')
- config.add_translation_dirs('pyramid.tests.pkgs.localeapp:locale')
+ config.override_asset('tests.pkgs.localeapp:locale/',
+ 'tests.pkgs.localeapp:locale2/')
+ config.add_translation_dirs('tests.pkgs.localeapp:locale')
self.assertEqual(config.registry.getUtility(ITranslationDirectories),
[locale2])
diff --git a/pyramid/tests/test_config/test_init.py b/tests/test_config/test_init.py
index 76a3d703d..a3c83357e 100644
--- a/pyramid/tests/test_config/test_init.py
+++ b/tests/test_config/test_init.py
@@ -5,12 +5,12 @@ import os
from pyramid.compat import im_func
from pyramid.testing import skip_on
-from pyramid.tests.test_config import dummy_tween_factory
-from pyramid.tests.test_config import dummy_include
-from pyramid.tests.test_config import dummy_extend
-from pyramid.tests.test_config import dummy_extend2
-from pyramid.tests.test_config import IDummy
-from pyramid.tests.test_config import DummyContext
+from . import dummy_tween_factory
+from . import dummy_include
+from . import dummy_extend
+from . import dummy_extend2
+from . import IDummy
+from . import DummyContext
from pyramid.exceptions import ConfigurationExecutionError
from pyramid.exceptions import ConfigurationConflictError
@@ -63,7 +63,7 @@ class ConfiguratorTests(unittest.TestCase):
from pyramid.config import Configurator
from pyramid.interfaces import IRendererFactory
config = Configurator()
- this_pkg = sys.modules['pyramid.tests.test_config']
+ this_pkg = sys.modules['tests.test_config']
self.assertTrue(config.registry.getUtility(ISettings))
self.assertEqual(config.package, this_pkg)
config.commit()
@@ -178,7 +178,7 @@ class ConfiguratorTests(unittest.TestCase):
from pyramid.interfaces import IDebugLogger
config = self._makeOne()
logger = config.registry.getUtility(IDebugLogger)
- self.assertEqual(logger.name, 'pyramid.tests.test_config')
+ self.assertEqual(logger.name, 'tests.test_config')
def test_ctor_noreg_debug_logger_non_None(self):
from pyramid.interfaces import IDebugLogger
@@ -294,28 +294,28 @@ class ConfiguratorTests(unittest.TestCase):
self.assertEqual(result, response)
def test_with_package_module(self):
- from pyramid.tests.test_config import test_init
- import pyramid.tests
+ from . import test_init
config = self._makeOne()
newconfig = config.with_package(test_init)
- self.assertEqual(newconfig.package, pyramid.tests.test_config)
+ import tests.test_config
+ self.assertEqual(newconfig.package, tests.test_config)
def test_with_package_package(self):
- import pyramid.tests.test_config
+ from tests import test_config
config = self._makeOne()
- newconfig = config.with_package(pyramid.tests.test_config)
- self.assertEqual(newconfig.package, pyramid.tests.test_config)
+ newconfig = config.with_package(test_config)
+ self.assertEqual(newconfig.package, test_config)
def test_with_package(self):
- import pyramid.tests
+ import tests
config = self._makeOne()
config.basepath = 'basepath'
config.info = 'info'
config.includepath = ('spec',)
config.autocommit = True
config.route_prefix = 'prefix'
- newconfig = config.with_package(pyramid.tests)
- self.assertEqual(newconfig.package, pyramid.tests)
+ newconfig = config.with_package(tests)
+ self.assertEqual(newconfig.package, tests)
self.assertEqual(newconfig.registry, config.registry)
self.assertEqual(newconfig.autocommit, True)
self.assertEqual(newconfig.route_prefix, 'prefix')
@@ -324,38 +324,38 @@ class ConfiguratorTests(unittest.TestCase):
self.assertEqual(newconfig.includepath, ('spec',))
def test_maybe_dotted_string_success(self):
- import pyramid.tests.test_config
+ import tests.test_config
config = self._makeOne()
- result = config.maybe_dotted('pyramid.tests.test_config')
- self.assertEqual(result, pyramid.tests.test_config)
+ result = config.maybe_dotted('tests.test_config')
+ self.assertEqual(result, tests.test_config)
def test_maybe_dotted_string_fail(self):
config = self._makeOne()
self.assertRaises(ImportError, config.maybe_dotted, 'cant.be.found')
def test_maybe_dotted_notstring_success(self):
- import pyramid.tests.test_config
+ import tests.test_config
config = self._makeOne()
- result = config.maybe_dotted(pyramid.tests.test_config)
- self.assertEqual(result, pyramid.tests.test_config)
+ result = config.maybe_dotted(tests.test_config)
+ self.assertEqual(result, tests.test_config)
def test_absolute_asset_spec_already_absolute(self):
- import pyramid.tests.test_config
- config = self._makeOne(package=pyramid.tests.test_config)
+ import tests.test_config
+ config = self._makeOne(package=tests.test_config)
result = config.absolute_asset_spec('already:absolute')
self.assertEqual(result, 'already:absolute')
def test_absolute_asset_spec_notastring(self):
- import pyramid.tests.test_config
- config = self._makeOne(package=pyramid.tests.test_config)
+ import tests.test_config
+ config = self._makeOne(package=tests.test_config)
result = config.absolute_asset_spec(None)
self.assertEqual(result, None)
def test_absolute_asset_spec_relative(self):
- import pyramid.tests.test_config
- config = self._makeOne(package=pyramid.tests.test_config)
+ import tests.test_config
+ config = self._makeOne(package=tests.test_config)
result = config.absolute_asset_spec('files')
- self.assertEqual(result, 'pyramid.tests.test_config:files')
+ self.assertEqual(result, 'tests.test_config:files')
def test__fix_registry_has_listeners(self):
reg = DummyRegistry()
@@ -498,7 +498,7 @@ class ConfiguratorTests(unittest.TestCase):
config = self._makeOne(reg)
config.setup_registry()
logger = reg.getUtility(IDebugLogger)
- self.assertEqual(logger.name, 'pyramid.tests.test_config')
+ self.assertEqual(logger.name, 'tests.test_config')
def test_setup_registry_debug_logger_non_None(self):
from pyramid.registry import Registry
@@ -535,11 +535,11 @@ class ConfiguratorTests(unittest.TestCase):
from pyramid.interfaces import IAuthenticationPolicy
reg = Registry()
config = self._makeOne(reg)
- config.setup_registry(authentication_policy='pyramid.tests.test_config')
+ config.setup_registry(authentication_policy='tests.test_config')
config.commit()
result = reg.getUtility(IAuthenticationPolicy)
- import pyramid.tests.test_config
- self.assertEqual(result, pyramid.tests.test_config)
+ import tests.test_config
+ self.assertEqual(result, tests.test_config)
def test_setup_registry_authorization_policy_dottedname(self):
from pyramid.registry import Registry
@@ -548,11 +548,11 @@ class ConfiguratorTests(unittest.TestCase):
config = self._makeOne(reg)
dummy = object()
config.setup_registry(authentication_policy=dummy,
- authorization_policy='pyramid.tests.test_config')
+ authorization_policy='tests.test_config')
config.commit()
result = reg.getUtility(IAuthorizationPolicy)
- import pyramid.tests.test_config
- self.assertEqual(result, pyramid.tests.test_config)
+ import tests.test_config
+ self.assertEqual(result, tests.test_config)
def test_setup_registry_authorization_policy_only(self):
from pyramid.registry import Registry
@@ -576,24 +576,23 @@ class ConfiguratorTests(unittest.TestCase):
from pyramid.interfaces import IRootFactory
reg = Registry()
config = self._makeOne(reg)
- import pyramid.tests.test_config
- config.setup_registry(root_factory='pyramid.tests.test_config')
+ import tests.test_config
+ config.setup_registry(root_factory='tests.test_config')
self.assertEqual(reg.queryUtility(IRootFactory), None)
config.commit()
- self.assertEqual(reg.getUtility(IRootFactory),
- pyramid.tests.test_config)
+ self.assertEqual(reg.getUtility(IRootFactory), tests.test_config)
def test_setup_registry_locale_negotiator_dottedname(self):
from pyramid.registry import Registry
from pyramid.interfaces import ILocaleNegotiator
reg = Registry()
config = self._makeOne(reg)
- import pyramid.tests.test_config
- config.setup_registry(locale_negotiator='pyramid.tests.test_config')
+ import tests.test_config
+ config.setup_registry(locale_negotiator='tests.test_config')
self.assertEqual(reg.queryUtility(ILocaleNegotiator), None)
config.commit()
utility = reg.getUtility(ILocaleNegotiator)
- self.assertEqual(utility, pyramid.tests.test_config)
+ self.assertEqual(utility, tests.test_config)
def test_setup_registry_locale_negotiator(self):
from pyramid.registry import Registry
@@ -636,12 +635,12 @@ class ConfiguratorTests(unittest.TestCase):
from pyramid.interfaces import IRequestFactory
reg = Registry()
config = self._makeOne(reg)
- import pyramid.tests.test_config
- config.setup_registry(request_factory='pyramid.tests.test_config')
+ import tests.test_config
+ config.setup_registry(request_factory='tests.test_config')
self.assertEqual(reg.queryUtility(IRequestFactory), None)
config.commit()
utility = reg.getUtility(IRequestFactory)
- self.assertEqual(utility, pyramid.tests.test_config)
+ self.assertEqual(utility, tests.test_config)
def test_setup_registry_alternate_renderers(self):
from pyramid.registry import Registry
@@ -669,8 +668,8 @@ class ConfiguratorTests(unittest.TestCase):
config = self._makeOne(reg)
settings = {
'pyramid.includes':
-"""pyramid.tests.test_config.dummy_include
-pyramid.tests.test_config.dummy_include2""",
+"""tests.test_config.dummy_include
+tests.test_config.dummy_include2""",
}
config.setup_registry(settings=settings)
self.assertTrue(reg.included)
@@ -682,7 +681,7 @@ pyramid.tests.test_config.dummy_include2""",
config = self._makeOne(reg)
settings = {
'pyramid.includes':
-"""pyramid.tests.test_config.dummy_include pyramid.tests.test_config.dummy_include2""",
+"""tests.test_config.dummy_include tests.test_config.dummy_include2""",
}
config.setup_registry(settings=settings)
self.assertTrue(reg.included)
@@ -695,14 +694,14 @@ pyramid.tests.test_config.dummy_include2""",
config = self._makeOne(reg)
settings = {
'pyramid.tweens':
- 'pyramid.tests.test_config.dummy_tween_factory'
+ 'tests.test_config.dummy_tween_factory'
}
config.setup_registry(settings=settings)
config.commit()
tweens = config.registry.getUtility(ITweens)
self.assertEqual(
tweens.explicit,
- [('pyramid.tests.test_config.dummy_tween_factory',
+ [('tests.test_config.dummy_tween_factory',
dummy_tween_factory)])
def test_introspector_decorator(self):
@@ -739,9 +738,9 @@ pyramid.tests.test_config.dummy_include2""",
pyramid.config.global_registries.empty()
def test_include_with_dotted_name(self):
- from pyramid.tests import test_config
+ from tests import test_config
config = self._makeOne()
- config.include('pyramid.tests.test_config.dummy_include')
+ config.include('tests.test_config.dummy_include')
after = config.action_state
actions = after.actions
self.assertEqual(len(actions), 1)
@@ -751,7 +750,7 @@ pyramid.tests.test_config.dummy_include2""",
self.assertEqual(action['args'], test_config)
def test_include_with_python_callable(self):
- from pyramid.tests import test_config
+ from tests import test_config
config = self._makeOne()
config.include(dummy_include)
after = config.action_state
@@ -763,9 +762,9 @@ pyramid.tests.test_config.dummy_include2""",
self.assertEqual(action['args'], test_config)
def test_include_with_module_defaults_to_includeme(self):
- from pyramid.tests import test_config
+ from tests import test_config
config = self._makeOne()
- config.include('pyramid.tests.test_config')
+ config.include('tests.test_config')
after = config.action_state
actions = after.actions
self.assertEqual(len(actions), 1)
@@ -777,7 +776,7 @@ pyramid.tests.test_config.dummy_include2""",
def test_include_with_module_defaults_to_includeme_missing(self):
from pyramid.exceptions import ConfigurationError
config = self._makeOne()
- self.assertRaises(ConfigurationError, config.include, 'pyramid.tests')
+ self.assertRaises(ConfigurationError, config.include, 'tests')
def test_include_with_route_prefix(self):
root_config = self._makeOne(autocommit=True)
@@ -812,18 +811,18 @@ pyramid.tests.test_config.dummy_include2""",
return None
config.inspect = DummyInspect()
try:
- config.include('pyramid.tests.test_config.dummy_include')
+ config.include('tests.test_config.dummy_include')
except ConfigurationError as e:
self.assertEqual(
e.args[0],
- "No source file for module 'pyramid.tests.test_config' (.py "
+ "No source file for module 'tests.test_config' (.py "
"file must exist, refusing to use orphan .pyc or .pyo file).")
else: # pragma: no cover
raise AssertionError
def test_include_constant_root_package(self):
- from pyramid import tests
- from pyramid.tests import test_config
+ import tests
+ from tests import test_config
config = self._makeOne(root_package=tests)
results = {}
def include(config):
@@ -834,8 +833,8 @@ pyramid.tests.test_config.dummy_include2""",
self.assertEqual(results['package'], test_config)
def test_include_threadlocals_active(self):
- from pyramid.tests import test_config
from pyramid.threadlocal import get_current_registry
+ from tests import test_config
stack = []
def include(config):
stack.append(get_current_registry())
@@ -935,7 +934,7 @@ pyramid.tests.test_config.dummy_include2""",
from zope.interface import alsoProvides
from pyramid.interfaces import IRequest
from pyramid.view import render_view_to_response
- import pyramid.tests.test_config.pkgs.scannable as package
+ import tests.test_config.pkgs.scannable as package
config = self._makeOne(autocommit=True)
config.scan(package)
@@ -1039,10 +1038,10 @@ pyramid.tests.test_config.dummy_include2""",
from zope.interface import alsoProvides
from pyramid.interfaces import IRequest
from pyramid.view import render_view_to_response
- import pyramid.tests.test_config.pkgs.scannable as package
+ import tests.test_config.pkgs.scannable as package
config = self._makeOne(autocommit=True)
config.scan(package,
- ignore='pyramid.tests.test_config.pkgs.scannable.another')
+ ignore='tests.test_config.pkgs.scannable.another')
ctx = DummyContext()
req = DummyRequest()
@@ -1062,7 +1061,7 @@ pyramid.tests.test_config.dummy_include2""",
from pyramid.interfaces import IRequest
from pyramid.view import render_view_to_response
config = self._makeOne(autocommit=True)
- config.scan('pyramid.tests.test_config.pkgs.scannable')
+ config.scan('tests.test_config.pkgs.scannable')
ctx = DummyContext()
req = DummyRequest()
@@ -1075,7 +1074,7 @@ pyramid.tests.test_config.dummy_include2""",
def test_scan_integration_with_extra_kw(self):
config = self._makeOne(autocommit=True)
- config.scan('pyramid.tests.test_config.pkgs.scanextrakw', a=1)
+ config.scan('tests.test_config.pkgs.scanextrakw', a=1)
self.assertEqual(config.a, 1)
def test_scan_integration_with_onerror(self):
@@ -1097,7 +1096,7 @@ pyramid.tests.test_config.dummy_include2""",
sys.path.remove(path)
def test_scan_integration_conflict(self):
- from pyramid.tests.test_config.pkgs import selfscan
+ from tests.test_config.pkgs import selfscan
from pyramid.config import Configurator
c = Configurator()
c.scan(selfscan)
@@ -1275,10 +1274,10 @@ class TestConfigurator_add_directive(unittest.TestCase):
self.config = Configurator()
def test_extend_with_dotted_name(self):
- from pyramid.tests import test_config
+ from tests import test_config
config = self.config
config.add_directive(
- 'dummy_extend', 'pyramid.tests.test_config.dummy_extend')
+ 'dummy_extend', 'tests.test_config.dummy_extend')
self.assertTrue(hasattr(config, 'dummy_extend'))
config.dummy_extend('discrim')
after = config.action_state
@@ -1288,10 +1287,10 @@ class TestConfigurator_add_directive(unittest.TestCase):
self.assertEqual(action['args'], test_config)
def test_add_directive_with_partial(self):
- from pyramid.tests import test_config
+ from tests import test_config
config = self.config
config.add_directive(
- 'dummy_partial', 'pyramid.tests.test_config.dummy_partial')
+ 'dummy_partial', 'tests.test_config.dummy_partial')
self.assertTrue(hasattr(config, 'dummy_partial'))
config.dummy_partial()
after = config.action_state
@@ -1301,10 +1300,10 @@ class TestConfigurator_add_directive(unittest.TestCase):
self.assertEqual(action['args'], test_config)
def test_add_directive_with_custom_callable(self):
- from pyramid.tests import test_config
+ from tests import test_config
config = self.config
config.add_directive(
- 'dummy_callable', 'pyramid.tests.test_config.dummy_callable')
+ 'dummy_callable', 'tests.test_config.dummy_callable')
self.assertTrue(hasattr(config, 'dummy_callable'))
config.dummy_callable('discrim')
after = config.action_state
@@ -1314,7 +1313,7 @@ class TestConfigurator_add_directive(unittest.TestCase):
self.assertEqual(action['args'], test_config)
def test_extend_with_python_callable(self):
- from pyramid.tests import test_config
+ from tests import test_config
config = self.config
config.add_directive(
'dummy_extend', dummy_extend)
@@ -1351,7 +1350,7 @@ class TestConfigurator_add_directive(unittest.TestCase):
def test_directive_persists_across_configurator_creations(self):
config = self.config
config.add_directive('dummy_extend', dummy_extend)
- config2 = config.with_package('pyramid.tests')
+ config2 = config.with_package('tests')
config2.dummy_extend('discrim')
after = config2.action_state
actions = after.actions
@@ -1391,7 +1390,7 @@ class TestConfigurator__add_predicate(unittest.TestCase):
config._add_predicate(
'route',
'testing',
- 'pyramid.tests.test_config.test_init.DummyPredicate'
+ 'tests.test_config.test_init.DummyPredicate'
)
class TestActionState(unittest.TestCase):
@@ -1404,7 +1403,7 @@ class TestActionState(unittest.TestCase):
self.assertEqual(c.actions, [])
def test_action_simple(self):
- from pyramid.tests.test_config import dummyfactory as f
+ from . import dummyfactory as f
c = self._makeOne()
c.actions = []
c.action(1, f, (1,), {'x':1})
@@ -1733,7 +1732,7 @@ class Test_resolveConflicts(unittest.TestCase):
return resolveConflicts(actions)
def test_it_success_tuples(self):
- from pyramid.tests.test_config import dummyfactory as f
+ from . import dummyfactory as f
result = self._callFUT([
(None, f),
(1, f, (1,), {}, (), 'first'),
@@ -1794,7 +1793,7 @@ class Test_resolveConflicts(unittest.TestCase):
)
def test_it_success_dicts(self):
- from pyramid.tests.test_config import dummyfactory as f
+ from . import dummyfactory as f
result = self._callFUT([
(None, f),
(1, f, (1,), {}, (), 'first'),
@@ -1855,7 +1854,7 @@ class Test_resolveConflicts(unittest.TestCase):
)
def test_it_conflict(self):
- from pyramid.tests.test_config import dummyfactory as f
+ from . import dummyfactory as f
result = self._callFUT([
(None, f),
(1, f, (2,), {}, ('x',), 'eek'), # will conflict
@@ -1867,7 +1866,7 @@ class Test_resolveConflicts(unittest.TestCase):
self.assertRaises(ConfigurationConflictError, list, result)
def test_it_with_actions_grouped_by_order(self):
- from pyramid.tests.test_config import dummyfactory as f
+ from . import dummyfactory as f
result = self._callFUT([
(None, f), # X
(1, f, (1,), {}, (), 'third', 10), # X
@@ -1941,7 +1940,7 @@ class Test_resolveConflicts(unittest.TestCase):
)
def test_override_success_across_orders(self):
- from pyramid.tests.test_config import dummyfactory as f
+ from . import dummyfactory as f
result = self._callFUT([
(1, f, (2,), {}, ('x',), 'eek', 0),
(1, f, (3,), {}, ('x', 'y'), 'ack', 10),
@@ -1959,7 +1958,7 @@ class Test_resolveConflicts(unittest.TestCase):
])
def test_conflicts_across_orders(self):
- from pyramid.tests.test_config import dummyfactory as f
+ from . import dummyfactory as f
result = self._callFUT([
(1, f, (2,), {}, ('x', 'y'), 'eek', 0),
(1, f, (3,), {}, ('x'), 'ack', 10),
diff --git a/pyramid/tests/test_config/test_rendering.py b/tests/test_config/test_rendering.py
index cede64d3a..8794fa9df 100644
--- a/pyramid/tests/test_config/test_rendering.py
+++ b/tests/test_config/test_rendering.py
@@ -27,8 +27,8 @@ class TestRenderingConfiguratorMixin(unittest.TestCase):
def test_add_renderer_dottedname_factory(self):
from pyramid.interfaces import IRendererFactory
config = self._makeOne(autocommit=True)
- import pyramid.tests.test_config
- config.add_renderer('name', 'pyramid.tests.test_config')
+ import tests.test_config
+ config.add_renderer('name', 'tests.test_config')
self.assertEqual(config.registry.getUtility(IRendererFactory, 'name'),
- pyramid.tests.test_config)
+ tests.test_config)
diff --git a/pyramid/tests/test_config/test_routes.py b/tests/test_config/test_routes.py
index 9f4ce9bc6..870abe0ee 100644
--- a/pyramid/tests/test_config/test_routes.py
+++ b/tests/test_config/test_routes.py
@@ -1,7 +1,7 @@
import unittest
-from pyramid.tests.test_config import dummyfactory
-from pyramid.tests.test_config import DummyContext
+from . import dummyfactory
+from . import DummyContext
from pyramid.compat import text_
class RoutesConfiguratorMixinTests(unittest.TestCase):
@@ -74,7 +74,7 @@ class RoutesConfiguratorMixinTests(unittest.TestCase):
config = self._makeOne(autocommit=True)
config.add_route(
'name', 'path',
- factory='pyramid.tests.test_config.dummyfactory')
+ factory='tests.test_config.dummyfactory')
route = self._assertRoute(config, 'name', 'path')
self.assertEqual(route.factory, dummyfactory)
diff --git a/pyramid/tests/test_config/test_security.py b/tests/test_config/test_security.py
index 5db8e21fc..5db8e21fc 100644
--- a/pyramid/tests/test_config/test_security.py
+++ b/tests/test_config/test_security.py
diff --git a/pyramid/tests/test_config/test_settings.py b/tests/test_config/test_settings.py
index a3afd24e7..a3afd24e7 100644
--- a/pyramid/tests/test_config/test_settings.py
+++ b/tests/test_config/test_settings.py
diff --git a/pyramid/tests/test_config/test_testing.py b/tests/test_config/test_testing.py
index 05561bfe9..5be4e48d3 100644
--- a/pyramid/tests/test_config/test_testing.py
+++ b/tests/test_config/test_testing.py
@@ -2,7 +2,7 @@ import unittest
from pyramid.compat import text_
from pyramid.security import AuthenticationAPIMixin, AuthorizationAPIMixin
-from pyramid.tests.test_config import IDummy
+from . import IDummy
class TestingConfiguratorMixinTests(unittest.TestCase):
def _makeOne(self, *arg, **kw):
@@ -91,7 +91,7 @@ class TestingConfiguratorMixinTests(unittest.TestCase):
def test_testing_add_subscriber_dottedname(self):
config = self._makeOne(autocommit=True)
L = config.testing_add_subscriber(
- 'pyramid.tests.test_config.test_init.IDummy')
+ 'tests.test_config.test_init.IDummy')
event = DummyEvent()
config.registry.notify(event)
self.assertEqual(len(L), 1)
diff --git a/pyramid/tests/test_config/test_tweens.py b/tests/test_config/test_tweens.py
index 9c3433468..25615c699 100644
--- a/pyramid/tests/test_config/test_tweens.py
+++ b/tests/test_config/test_tweens.py
@@ -1,7 +1,7 @@
import unittest
-from pyramid.tests.test_config import dummy_tween_factory
-from pyramid.tests.test_config import dummy_tween_factory2
+from . import dummy_tween_factory
+from . import dummy_tween_factory2
from pyramid.exceptions import ConfigurationConflictError
@@ -18,18 +18,18 @@ class TestTweensConfiguratorMixin(unittest.TestCase):
def factory2(handler, registry): return handler
config = self._makeOne()
config.add_tween(
- 'pyramid.tests.test_config.dummy_tween_factory')
+ 'tests.test_config.dummy_tween_factory')
config.add_tween(
- 'pyramid.tests.test_config.dummy_tween_factory2')
+ 'tests.test_config.dummy_tween_factory2')
config.commit()
tweens = config.registry.queryUtility(ITweens)
implicit = tweens.implicit()
self.assertEqual(
implicit,
[
- ('pyramid.tests.test_config.dummy_tween_factory2',
+ ('tests.test_config.dummy_tween_factory2',
dummy_tween_factory2),
- ('pyramid.tests.test_config.dummy_tween_factory',
+ ('tests.test_config.dummy_tween_factory',
dummy_tween_factory),
('pyramid.tweens.excview_tween_factory',
excview_tween_factory),
@@ -42,12 +42,12 @@ class TestTweensConfiguratorMixin(unittest.TestCase):
from pyramid.tweens import MAIN
config = self._makeOne()
config.add_tween(
- 'pyramid.tests.test_config.dummy_tween_factory',
+ 'tests.test_config.dummy_tween_factory',
over=MAIN)
config.add_tween(
- 'pyramid.tests.test_config.dummy_tween_factory2',
+ 'tests.test_config.dummy_tween_factory2',
over=MAIN,
- under='pyramid.tests.test_config.dummy_tween_factory')
+ under='tests.test_config.dummy_tween_factory')
config.commit()
tweens = config.registry.queryUtility(ITweens)
implicit = tweens.implicit()
@@ -55,9 +55,9 @@ class TestTweensConfiguratorMixin(unittest.TestCase):
implicit,
[
('pyramid.tweens.excview_tween_factory', excview_tween_factory),
- ('pyramid.tests.test_config.dummy_tween_factory',
+ ('tests.test_config.dummy_tween_factory',
dummy_tween_factory),
- ('pyramid.tests.test_config.dummy_tween_factory2',
+ ('tests.test_config.dummy_tween_factory2',
dummy_tween_factory2),
])
@@ -66,7 +66,7 @@ class TestTweensConfiguratorMixin(unittest.TestCase):
config = self._makeOne()
self.assertRaises(
ConfigurationError, config.add_tween,
- 'pyramid.tests.test_config.dummy_tween_factory',
+ 'tests.test_config.dummy_tween_factory',
under=False)
def test_add_tweens_names_with_over_nonstringoriter(self):
@@ -74,20 +74,20 @@ class TestTweensConfiguratorMixin(unittest.TestCase):
config = self._makeOne()
self.assertRaises(
ConfigurationError, config.add_tween,
- 'pyramid.tests.test_config.dummy_tween_factory',
+ 'tests.test_config.dummy_tween_factory',
over=False)
def test_add_tween_dottedname(self):
from pyramid.interfaces import ITweens
from pyramid.tweens import excview_tween_factory
config = self._makeOne()
- config.add_tween('pyramid.tests.test_config.dummy_tween_factory')
+ config.add_tween('tests.test_config.dummy_tween_factory')
config.commit()
tweens = config.registry.queryUtility(ITweens)
self.assertEqual(
tweens.implicit(),
[
- ('pyramid.tests.test_config.dummy_tween_factory',
+ ('tests.test_config.dummy_tween_factory',
dummy_tween_factory),
('pyramid.tweens.excview_tween_factory',
excview_tween_factory),
@@ -102,10 +102,10 @@ class TestTweensConfiguratorMixin(unittest.TestCase):
def test_add_tween_unsuitable(self):
from pyramid.exceptions import ConfigurationError
- import pyramid.tests.test_config
+ import tests.test_config
config = self._makeOne()
self.assertRaises(ConfigurationError, config.add_tween,
- pyramid.tests.test_config)
+ tests.test_config)
def test_add_tween_name_ingress(self):
from pyramid.exceptions import ConfigurationError
@@ -121,8 +121,8 @@ class TestTweensConfiguratorMixin(unittest.TestCase):
def test_add_tweens_conflict(self):
config = self._makeOne()
- config.add_tween('pyramid.tests.test_config.dummy_tween_factory')
- config.add_tween('pyramid.tests.test_config.dummy_tween_factory')
+ config.add_tween('tests.test_config.dummy_tween_factory')
+ config.add_tween('tests.test_config.dummy_tween_factory')
self.assertRaises(ConfigurationConflictError, config.commit)
def test_add_tween_over_ingress(self):
@@ -132,7 +132,7 @@ class TestTweensConfiguratorMixin(unittest.TestCase):
self.assertRaises(
ConfigurationError,
config.add_tween,
- 'pyramid.tests.test_config.dummy_tween_factory',
+ 'tests.test_config.dummy_tween_factory',
over=INGRESS)
def test_add_tween_over_ingress_iterable(self):
@@ -142,7 +142,7 @@ class TestTweensConfiguratorMixin(unittest.TestCase):
self.assertRaises(
ConfigurationError,
config.add_tween,
- 'pyramid.tests.test_config.dummy_tween_factory',
+ 'tests.test_config.dummy_tween_factory',
over=('a', INGRESS))
def test_add_tween_under_main(self):
@@ -152,7 +152,7 @@ class TestTweensConfiguratorMixin(unittest.TestCase):
self.assertRaises(
ConfigurationError,
config.add_tween,
- 'pyramid.tests.test_config.dummy_tween_factory',
+ 'tests.test_config.dummy_tween_factory',
under=MAIN)
def test_add_tween_under_main_iterable(self):
@@ -162,7 +162,7 @@ class TestTweensConfiguratorMixin(unittest.TestCase):
self.assertRaises(
ConfigurationError,
config.add_tween,
- 'pyramid.tests.test_config.dummy_tween_factory',
+ 'tests.test_config.dummy_tween_factory',
under=('a', MAIN))
class TestTweens(unittest.TestCase):
diff --git a/pyramid/tests/test_config/test_util.py b/tests/test_config/test_util.py
index 540f3d14c..540f3d14c 100644
--- a/pyramid/tests/test_config/test_util.py
+++ b/tests/test_config/test_util.py
diff --git a/pyramid/tests/test_config/test_views.py b/tests/test_config/test_views.py
index 6565a35d5..1af3f66bc 100644
--- a/pyramid/tests/test_config/test_views.py
+++ b/tests/test_config/test_views.py
@@ -2,9 +2,9 @@ import os
import unittest
from pyramid import testing
-from pyramid.tests.test_config import IDummy
+from . import IDummy
-from pyramid.tests.test_config import dummy_view
+from . import dummy_view
from pyramid.compat import (
im_func,
@@ -155,7 +155,7 @@ class TestViewsConfigurationMixin(unittest.TestCase):
def test_add_view_view_callable_dottedname(self):
from pyramid.renderers import null_renderer
config = self._makeOne(autocommit=True)
- config.add_view(view='pyramid.tests.test_config.dummy_view',
+ config.add_view(view='tests.test_config.dummy_view',
renderer=null_renderer)
wrapper = self._getViewCallable(config)
self.assertEqual(wrapper(None, None), 'OK')
@@ -367,7 +367,7 @@ class TestViewsConfigurationMixin(unittest.TestCase):
from pyramid.renderers import null_renderer
view = lambda *arg: 'OK'
config = self._makeOne(autocommit=True)
- config.add_view(context='pyramid.tests.test_config.IDummy',
+ config.add_view(context='tests.test_config.IDummy',
view=view, renderer=null_renderer)
wrapper = self._getViewCallable(config, IDummy)
self.assertEqual(wrapper, view)
@@ -376,7 +376,7 @@ class TestViewsConfigurationMixin(unittest.TestCase):
from pyramid.renderers import null_renderer
view = lambda *arg: 'OK'
config = self._makeOne(autocommit=True)
- config.add_view(for_='pyramid.tests.test_config.IDummy',
+ config.add_view(for_='tests.test_config.IDummy',
view=view, renderer=null_renderer)
wrapper = self._getViewCallable(config, IDummy)
self.assertEqual(wrapper, view)
@@ -1162,7 +1162,7 @@ class TestViewsConfigurationMixin(unittest.TestCase):
)
def test_add_view_with_template_renderer(self):
- from pyramid.tests import test_config
+ from tests import test_config
from pyramid.interfaces import ISettings
class view(object):
def __init__(self, context, request):
@@ -1173,7 +1173,7 @@ class TestViewsConfigurationMixin(unittest.TestCase):
return {'a':'1'}
config = self._makeOne(autocommit=True)
renderer = self._registerRenderer(config)
- fixture = 'pyramid.tests.test_config:files/minimal.txt'
+ fixture = 'tests.test_config:files/minimal.txt'
config.introspection = False
config.add_view(view=view, renderer=fixture)
wrapper = self._getViewCallable(config)
@@ -1210,11 +1210,11 @@ class TestViewsConfigurationMixin(unittest.TestCase):
self.assertEqual(result.body, b'moo')
def test_add_view_with_template_renderer_no_callable(self):
- from pyramid.tests import test_config
+ from tests import test_config
from pyramid.interfaces import ISettings
config = self._makeOne(autocommit=True)
renderer = self._registerRenderer(config)
- fixture = 'pyramid.tests.test_config:files/minimal.txt'
+ fixture = 'tests.test_config:files/minimal.txt'
config.introspection = False
config.add_view(view=None, renderer=fixture)
wrapper = self._getViewCallable(config)
@@ -1522,7 +1522,7 @@ class TestViewsConfigurationMixin(unittest.TestCase):
config = self._makeOne(autocommit=True)
config.add_view(
view=view,
- containment='pyramid.tests.test_config.IDummy',
+ containment='tests.test_config.IDummy',
renderer=null_renderer)
wrapper = self._getViewCallable(config)
context = DummyContext()
@@ -1773,7 +1773,7 @@ class TestViewsConfigurationMixin(unittest.TestCase):
from zope.interface import directlyProvides
class view(object):
__view_defaults__ = {
- 'containment':'pyramid.tests.test_config.IDummy'
+ 'containment':'tests.test_config.IDummy'
}
def __init__(self, request):
pass
@@ -1798,7 +1798,7 @@ class TestViewsConfigurationMixin(unittest.TestCase):
from zope.interface import directlyProvides
config = self._makeOne(autocommit=True)
config.add_view(
- view='pyramid.tests.test_config.test_views.DummyViewDefaultsClass',
+ view='tests.test_config.test_views.DummyViewDefaultsClass',
renderer=null_renderer)
wrapper = self._getViewCallable(config)
context = DummyContext()
@@ -1815,7 +1815,7 @@ class TestViewsConfigurationMixin(unittest.TestCase):
from zope.interface import directlyProvides
config = self._makeOne(autocommit=True)
config.add_view(
- 'pyramid.tests.test_config.test_views.DummyViewDefaultsClass',
+ 'tests.test_config.test_views.DummyViewDefaultsClass',
renderer=null_renderer)
wrapper = self._getViewCallable(config)
context = DummyContext()
@@ -1830,11 +1830,11 @@ class TestViewsConfigurationMixin(unittest.TestCase):
from pyramid.renderers import null_renderer
class view(object):
__view_defaults__ = {
- 'containment':'pyramid.tests.test_config.IDummy'
+ 'containment':'tests.test_config.IDummy'
}
class view2(object):
__view_defaults__ = {
- 'containment':'pyramid.tests.test_config.IFactory'
+ 'containment':'tests.test_config.IFactory'
}
config = self._makeOne(autocommit=False)
config.add_view(
@@ -1849,11 +1849,11 @@ class TestViewsConfigurationMixin(unittest.TestCase):
from pyramid.renderers import null_renderer
class view(object):
__view_defaults__ = {
- 'containment':'pyramid.tests.test_config.IDummy'
+ 'containment':'tests.test_config.IDummy'
}
class view2(object):
__view_defaults__ = {
- 'containment':'pyramid.tests.test_config.IDummy'
+ 'containment':'tests.test_config.IDummy'
}
config = self._makeOne(autocommit=False)
config.add_view(
@@ -1975,7 +1975,7 @@ class TestViewsConfigurationMixin(unittest.TestCase):
from zope.interface import implementedBy
class view(object):
__view_defaults__ = {
- 'containment': 'pyramid.tests.test_config.IDummy'
+ 'containment': 'tests.test_config.IDummy'
}
def __init__(self, request):
pass
@@ -2009,7 +2009,7 @@ class TestViewsConfigurationMixin(unittest.TestCase):
from pyramid.renderers import null_renderer
config = self._makeOne()
result = config.derive_view(
- 'pyramid.tests.test_config.dummy_view',
+ 'tests.test_config.dummy_view',
renderer=null_renderer)
self.assertFalse(result is dummy_view)
self.assertEqual(result(None, None), 'OK')
@@ -2071,10 +2071,10 @@ class TestViewsConfigurationMixin(unittest.TestCase):
config = self._makeOne(autocommit=True)
config.registry.registerUtility(info, IStaticURLInfo)
config.add_static_view('static',
- 'pyramid.tests.test_config:files')
+ 'tests.test_config:files')
self.assertEqual(
info.added,
- [(config, 'static', 'pyramid.tests.test_config:files', {})])
+ [(config, 'static', 'tests.test_config:files', {})])
def test_add_static_view_package_here_relative(self):
from pyramid.interfaces import IStaticURLInfo
@@ -2084,7 +2084,7 @@ class TestViewsConfigurationMixin(unittest.TestCase):
config.add_static_view('static', 'files')
self.assertEqual(
info.added,
- [(config, 'static', 'pyramid.tests.test_config:files', {})])
+ [(config, 'static', 'tests.test_config:files', {})])
def test_add_static_view_absolute(self):
import os
@@ -2169,7 +2169,7 @@ class TestViewsConfigurationMixin(unittest.TestCase):
from zope.interface import implementedBy
class view(object):
__view_defaults__ = {
- 'containment':'pyramid.tests.test_config.IDummy'
+ 'containment':'tests.test_config.IDummy'
}
def __init__(self, request):
pass
@@ -2305,7 +2305,7 @@ class TestViewsConfigurationMixin(unittest.TestCase):
from zope.interface import implementedBy
class view(object):
__view_defaults__ = {
- 'containment':'pyramid.tests.test_config.IDummy'
+ 'containment':'tests.test_config.IDummy'
}
def __init__(self, request):
pass
@@ -2379,9 +2379,9 @@ class TestViewsConfigurationMixin(unittest.TestCase):
def test_set_view_mapper_dottedname(self):
from pyramid.interfaces import IViewMapperFactory
config = self._makeOne(autocommit=True)
- config.set_view_mapper('pyramid.tests.test_config')
+ config.set_view_mapper('tests.test_config')
result = config.registry.getUtility(IViewMapperFactory)
- from pyramid.tests import test_config
+ from tests import test_config
self.assertEqual(result, test_config)
def test_add_normal_and_exception_view_intr_derived_callable(self):
@@ -3284,8 +3284,8 @@ class TestStaticURLInfo(unittest.TestCase):
request = testing.DummyRequest()
config.add_static_view('static', 'path')
config.override_asset(
- 'pyramid.tests.test_config:path/',
- 'pyramid.tests.test_config:other_path/')
+ 'tests.test_config:path/',
+ 'tests.test_config:other_path/')
def cb(val):
def cb_(request, subpath, kw):
kw['_query'] = {'x': val}
@@ -3468,7 +3468,7 @@ class Test_view_description(unittest.TestCase):
def view(): pass
result = self._callFUT(view)
self.assertEqual(result,
- 'function pyramid.tests.test_config.test_views.view')
+ 'function tests.test_config.test_views.view')
class Test_viewdefaults(unittest.TestCase):
def _makeOne(self, wrapped):
@@ -3599,7 +3599,7 @@ class DummyStaticURLInfo:
class DummyViewDefaultsClass(object):
__view_defaults__ = {
- 'containment':'pyramid.tests.test_config.IDummy'
+ 'containment':'tests.test_config.IDummy'
}
def __init__(self, request):
pass
diff --git a/pyramid/tests/test_csrf.py b/tests/test_csrf.py
index 234d4434c..a224d928f 100644
--- a/pyramid/tests/test_csrf.py
+++ b/tests/test_csrf.py
@@ -239,7 +239,7 @@ class Test_check_csrf_token(unittest.TestCase):
self.config.set_default_csrf_options(require_csrf=False)
def _callFUT(self, *args, **kwargs):
- from ..csrf import check_csrf_token
+ from pyramid.csrf import check_csrf_token
return check_csrf_token(*args, **kwargs)
def test_success_token(self):
@@ -281,7 +281,7 @@ class Test_check_csrf_token_without_defaults_configured(unittest.TestCase):
self.config = testing.setUp()
def _callFUT(self, *args, **kwargs):
- from ..csrf import check_csrf_token
+ from pyramid.csrf import check_csrf_token
return check_csrf_token(*args, **kwargs)
def test_success_token(self):
@@ -304,7 +304,7 @@ class Test_check_csrf_token_without_defaults_configured(unittest.TestCase):
class Test_check_csrf_origin(unittest.TestCase):
def _callFUT(self, *args, **kwargs):
- from ..csrf import check_csrf_origin
+ from pyramid.csrf import check_csrf_origin
return check_csrf_origin(*args, **kwargs)
def test_success_with_http(self):
diff --git a/pyramid/tests/test_decorator.py b/tests/test_decorator.py
index 4b9313e06..4b9313e06 100644
--- a/pyramid/tests/test_decorator.py
+++ b/tests/test_decorator.py
diff --git a/pyramid/tests/test_docs.py b/tests/test_docs.py
index 0735a494a..0735a494a 100644
--- a/pyramid/tests/test_docs.py
+++ b/tests/test_docs.py
diff --git a/pyramid/tests/test_encode.py b/tests/test_encode.py
index d3a9f7095..d3a9f7095 100644
--- a/pyramid/tests/test_encode.py
+++ b/tests/test_encode.py
diff --git a/pyramid/tests/test_events.py b/tests/test_events.py
index 793ac329f..793ac329f 100644
--- a/pyramid/tests/test_events.py
+++ b/tests/test_events.py
diff --git a/pyramid/tests/test_exceptions.py b/tests/test_exceptions.py
index 9cb0f58d1..9cb0f58d1 100644
--- a/pyramid/tests/test_exceptions.py
+++ b/tests/test_exceptions.py
diff --git a/pyramid/tests/test_httpexceptions.py b/tests/test_httpexceptions.py
index ed6c41e0e..ed6c41e0e 100644
--- a/pyramid/tests/test_httpexceptions.py
+++ b/tests/test_httpexceptions.py
diff --git a/pyramid/tests/test_i18n.py b/tests/test_i18n.py
index d72d0d480..d72d0d480 100644
--- a/pyramid/tests/test_i18n.py
+++ b/tests/test_i18n.py
diff --git a/pyramid/tests/test_integration.py b/tests/test_integration.py
index eedc145ad..741c7599f 100644
--- a/pyramid/tests/test_integration.py
+++ b/tests/test_integration.py
@@ -48,7 +48,7 @@ class WGSIAppPlusViewConfigTests(unittest.TestCase):
from pyramid.interfaces import IView
from pyramid.interfaces import IViewClassifier
from pyramid.config import Configurator
- from pyramid.tests import test_integration
+ from . import test_integration
config = Configurator()
config.scan(test_integration)
config.commit()
@@ -189,7 +189,7 @@ class StaticAppBase(IntegrationBase):
self.testapp.get('/%2F/test_integration.py', status=404)
class TestEventOnlySubscribers(IntegrationBase, unittest.TestCase):
- package = 'pyramid.tests.pkgs.eventonly'
+ package = 'tests.pkgs.eventonly'
def test_sendfoo(self):
res = self.testapp.get('/sendfoo', status=200)
@@ -201,10 +201,10 @@ class TestEventOnlySubscribers(IntegrationBase, unittest.TestCase):
[b'foobar', b'foobar2', b'foobaryup', b'foobaryup2'])
class TestStaticAppUsingAbsPath(StaticAppBase, unittest.TestCase):
- package = 'pyramid.tests.pkgs.static_abspath'
+ package = 'tests.pkgs.static_abspath'
class TestStaticAppUsingAssetSpec(StaticAppBase, unittest.TestCase):
- package = 'pyramid.tests.pkgs.static_assetspec'
+ package = 'tests.pkgs.static_assetspec'
class TestStaticAppNoSubpath(unittest.TestCase):
staticapp = static_view(os.path.join(here, 'fixtures'), use_subpath=False)
@@ -231,7 +231,7 @@ class TestStaticAppNoSubpath(unittest.TestCase):
_assertBody(result.body, os.path.join(here, 'fixtures/minimal.txt'))
class TestStaticAppWithRoutePrefix(IntegrationBase, unittest.TestCase):
- package = 'pyramid.tests.pkgs.static_routeprefix'
+ package = 'tests.pkgs.static_routeprefix'
def test_includelevel1(self):
res = self.testapp.get('/static/minimal.txt', status=200)
@@ -245,7 +245,7 @@ class TestStaticAppWithRoutePrefix(IntegrationBase, unittest.TestCase):
class TestFixtureApp(IntegrationBase, unittest.TestCase):
- package = 'pyramid.tests.pkgs.fixtureapp'
+ package = 'tests.pkgs.fixtureapp'
def test_another(self):
res = self.testapp.get('/another.html', status=200)
self.assertEqual(res.body, b'fixture')
@@ -265,8 +265,8 @@ class TestFixtureApp(IntegrationBase, unittest.TestCase):
self.testapp.get('/protected.html', status=403)
class TestStaticPermApp(IntegrationBase, unittest.TestCase):
- package = 'pyramid.tests.pkgs.staticpermapp'
- root_factory = 'pyramid.tests.pkgs.staticpermapp:RootFactory'
+ package = 'tests.pkgs.staticpermapp'
+ root_factory = 'tests.pkgs.staticpermapp:RootFactory'
def test_allowed(self):
result = self.testapp.get('/allowed/index.html', status=200)
_assertBody(result.body,
@@ -295,7 +295,7 @@ class TestStaticPermApp(IntegrationBase, unittest.TestCase):
class TestCCBug(IntegrationBase, unittest.TestCase):
# "unordered" as reported in IRC by author of
# http://labs.creativecommons.org/2010/01/13/cc-engine-and-web-non-frameworks/
- package = 'pyramid.tests.pkgs.ccbugapp'
+ package = 'tests.pkgs.ccbugapp'
def test_rdf(self):
res = self.testapp.get('/licenses/1/v1/rdf', status=200)
self.assertEqual(res.body, b'rdf')
@@ -308,7 +308,7 @@ class TestHybridApp(IntegrationBase, unittest.TestCase):
# make sure views registered for a route "win" over views registered
# without one, even though the context of the non-route view may
# be more specific than the route view.
- package = 'pyramid.tests.pkgs.hybridapp'
+ package = 'tests.pkgs.hybridapp'
def test_root(self):
res = self.testapp.get('/', status=200)
self.assertEqual(res.body, b'global')
@@ -349,14 +349,14 @@ class TestHybridApp(IntegrationBase, unittest.TestCase):
class TestRestBugApp(IntegrationBase, unittest.TestCase):
# test bug reported by delijati 2010/2/3 (http://pastebin.com/d4cc15515)
- package = 'pyramid.tests.pkgs.restbugapp'
+ package = 'tests.pkgs.restbugapp'
def test_it(self):
res = self.testapp.get('/pet', status=200)
self.assertEqual(res.body, b'gotten')
class TestForbiddenAppHasResult(IntegrationBase, unittest.TestCase):
# test that forbidden exception has ACLDenied result attached
- package = 'pyramid.tests.pkgs.forbiddenapp'
+ package = 'tests.pkgs.forbiddenapp'
def test_it(self):
res = self.testapp.get('/x', status=403)
message, result = [x.strip() for x in res.body.split(b'\n')]
@@ -370,7 +370,7 @@ class TestForbiddenAppHasResult(IntegrationBase, unittest.TestCase):
result.endswith(b"for principals ['system.Everyone']"))
class TestViewDecoratorApp(IntegrationBase, unittest.TestCase):
- package = 'pyramid.tests.pkgs.viewdecoratorapp'
+ package = 'tests.pkgs.viewdecoratorapp'
def test_first(self):
res = self.testapp.get('/first', status=200)
@@ -381,7 +381,7 @@ class TestViewDecoratorApp(IntegrationBase, unittest.TestCase):
self.assertTrue(b'OK2' in res.body)
class TestNotFoundView(IntegrationBase, unittest.TestCase):
- package = 'pyramid.tests.pkgs.notfoundview'
+ package = 'tests.pkgs.notfoundview'
def test_it(self):
res = self.testapp.get('/wontbefound', status=200)
@@ -398,7 +398,7 @@ class TestNotFoundView(IntegrationBase, unittest.TestCase):
self.assertTrue(b'baz_notfound' in res.body)
class TestForbiddenView(IntegrationBase, unittest.TestCase):
- package = 'pyramid.tests.pkgs.forbiddenview'
+ package = 'tests.pkgs.forbiddenview'
def test_it(self):
res = self.testapp.get('/foo', status=200)
@@ -408,7 +408,7 @@ class TestForbiddenView(IntegrationBase, unittest.TestCase):
class TestViewPermissionBug(IntegrationBase, unittest.TestCase):
# view_execution_permitted bug as reported by Shane at http://lists.repoze.org/pipermail/repoze-dev/2010-October/003603.html
- package = 'pyramid.tests.pkgs.permbugapp'
+ package = 'tests.pkgs.permbugapp'
def test_test(self):
res = self.testapp.get('/test', status=200)
self.assertTrue(b'ACLDenied' in res.body)
@@ -418,7 +418,7 @@ class TestViewPermissionBug(IntegrationBase, unittest.TestCase):
class TestDefaultViewPermissionBug(IntegrationBase, unittest.TestCase):
# default_view_permission bug as reported by Wiggy at http://lists.repoze.org/pipermail/repoze-dev/2010-October/003602.html
- package = 'pyramid.tests.pkgs.defpermbugapp'
+ package = 'tests.pkgs.defpermbugapp'
def test_x(self):
res = self.testapp.get('/x', status=403)
self.assertTrue(b'failed permission check' in res.body)
@@ -431,13 +431,12 @@ class TestDefaultViewPermissionBug(IntegrationBase, unittest.TestCase):
res = self.testapp.get('/z', status=200)
self.assertTrue(b'public' in res.body)
-from pyramid.tests.pkgs.exceptionviewapp.models import \
- AnException, NotAnException
+from .pkgs.exceptionviewapp.models import AnException, NotAnException
excroot = {'anexception':AnException(),
'notanexception':NotAnException()}
class TestExceptionViewsApp(IntegrationBase, unittest.TestCase):
- package = 'pyramid.tests.pkgs.exceptionviewapp'
+ package = 'tests.pkgs.exceptionviewapp'
root_factory = lambda *arg: excroot
def test_root(self):
res = self.testapp.get('/', status=200)
@@ -472,7 +471,7 @@ class TestExceptionViewsApp(IntegrationBase, unittest.TestCase):
self.assertTrue(b'caught' in res.body)
class TestConflictApp(unittest.TestCase):
- package = 'pyramid.tests.pkgs.conflictapp'
+ package = 'tests.pkgs.conflictapp'
def _makeConfig(self):
from pyramid.config import Configurator
config = Configurator()
@@ -535,7 +534,7 @@ class ImperativeIncludeConfigurationTest(unittest.TestCase):
def setUp(self):
from pyramid.config import Configurator
config = Configurator()
- from pyramid.tests.pkgs.includeapp1.root import configure
+ from .pkgs.includeapp1.root import configure
configure(config)
app = config.make_wsgi_app()
self.testapp = TestApp(app)
@@ -558,7 +557,7 @@ class ImperativeIncludeConfigurationTest(unittest.TestCase):
class SelfScanAppTest(unittest.TestCase):
def setUp(self):
- from pyramid.tests.test_config.pkgs.selfscan import main
+ from .test_config.pkgs.selfscan import main
config = main()
app = config.make_wsgi_app()
self.testapp = TestApp(app)
@@ -577,7 +576,7 @@ class SelfScanAppTest(unittest.TestCase):
class WSGIApp2AppTest(unittest.TestCase):
def setUp(self):
- from pyramid.tests.pkgs.wsgiapp2app import main
+ from .pkgs.wsgiapp2app import main
config = main()
app = config.make_wsgi_app()
self.testapp = TestApp(app)
@@ -592,7 +591,7 @@ class WSGIApp2AppTest(unittest.TestCase):
class SubrequestAppTest(unittest.TestCase):
def setUp(self):
- from pyramid.tests.pkgs.subrequestapp import main
+ from .pkgs.subrequestapp import main
config = main()
app = config.make_wsgi_app()
self.testapp = TestApp(app)
@@ -614,7 +613,7 @@ class SubrequestAppTest(unittest.TestCase):
self.assertTrue(b'Value error raised' in res.body)
class RendererScanAppTest(IntegrationBase, unittest.TestCase):
- package = 'pyramid.tests.pkgs.rendererscanapp'
+ package = 'tests.pkgs.rendererscanapp'
def test_root(self):
res = self.testapp.get('/one', status=200)
self.assertTrue(b'One!' in res.body)
@@ -624,7 +623,7 @@ class RendererScanAppTest(IntegrationBase, unittest.TestCase):
self.assertTrue(b'Two!' in res.body)
def test_rescan(self):
- self.config.scan('pyramid.tests.pkgs.rendererscanapp')
+ self.config.scan('tests.pkgs.rendererscanapp')
app = self.config.make_wsgi_app()
testapp = TestApp(app)
res = testapp.get('/one', status=200)
diff --git a/pyramid/tests/test_location.py b/tests/test_location.py
index e1f47f4ab..e1f47f4ab 100644
--- a/pyramid/tests/test_location.py
+++ b/tests/test_location.py
diff --git a/pyramid/tests/test_paster.py b/tests/test_paster.py
index 784458647..dd296d03e 100644
--- a/pyramid/tests/test_paster.py
+++ b/tests/test_paster.py
@@ -1,6 +1,6 @@
import os
import unittest
-from pyramid.tests.test_scripts.dummy import DummyLoader
+from .test_scripts.dummy import DummyLoader
here = os.path.dirname(__file__)
diff --git a/pyramid/tests/test_path.py b/tests/test_path.py
index 563ece6d6..4ab314f17 100644
--- a/pyramid/tests/test_path.py
+++ b/tests/test_path.py
@@ -6,7 +6,7 @@ here = os.path.abspath(os.path.dirname(__file__))
class TestCallerPath(unittest.TestCase):
def tearDown(self):
- from pyramid.tests import test_path
+ from . import test_path
if hasattr(test_path, '__abspath__'):
del test_path.__abspath__
@@ -25,14 +25,14 @@ class TestCallerPath(unittest.TestCase):
def test_memoization_has_abspath(self):
import os
- from pyramid.tests import test_path
+ from . import test_path
test_path.__abspath__ = '/foo/bar'
result = self._callFUT('a/b/c')
self.assertEqual(result, os.path.join('/foo/bar', 'a/b/c'))
def test_memoization_success(self):
import os
- from pyramid.tests import test_path
+ from . import test_path
result = self._callFUT('a/b/c')
self.assertEqual(result, os.path.join(here, 'a/b/c'))
self.assertEqual(test_path.__abspath__, here)
@@ -43,17 +43,17 @@ class TestCallerModule(unittest.TestCase):
return caller_module(*arg, **kw)
def test_it_level_1(self):
- from pyramid.tests import test_path
+ from . import test_path
result = self._callFUT(1)
self.assertEqual(result, test_path)
def test_it_level_2(self):
- from pyramid.tests import test_path
+ from . import test_path
result = self._callFUT(2)
self.assertEqual(result, test_path)
def test_it_level_3(self):
- from pyramid.tests import test_path
+ from . import test_path
result = self._callFUT(3)
self.assertNotEqual(result, test_path)
@@ -75,12 +75,12 @@ class TestCallerPackage(unittest.TestCase):
return caller_package(*arg, **kw)
def test_it_level_1(self):
- from pyramid import tests
+ import tests
result = self._callFUT(1)
self.assertEqual(result, tests)
def test_it_level_2(self):
- from pyramid import tests
+ import tests
result = self._callFUT(2)
self.assertEqual(result, tests)
@@ -90,11 +90,11 @@ class TestCallerPackage(unittest.TestCase):
self.assertEqual(result, unittest)
def test_it_package(self):
- import pyramid.tests
+ import tests
def dummy_caller_module(*arg):
- return pyramid.tests
+ return tests
result = self._callFUT(1, caller_module=dummy_caller_module)
- self.assertEqual(result, pyramid.tests)
+ self.assertEqual(result, tests)
class TestPackagePath(unittest.TestCase):
def _callFUT(self, package):
@@ -102,25 +102,25 @@ class TestPackagePath(unittest.TestCase):
return package_path(package)
def test_it_package(self):
- from pyramid import tests
+ import tests
package = DummyPackageOrModule(tests)
result = self._callFUT(package)
self.assertEqual(result, package.package_path)
def test_it_module(self):
- from pyramid.tests import test_path
+ from . import test_path
module = DummyPackageOrModule(test_path)
result = self._callFUT(module)
self.assertEqual(result, module.package_path)
def test_memoization_success(self):
- from pyramid.tests import test_path
+ from . import test_path
module = DummyPackageOrModule(test_path)
self._callFUT(module)
self.assertEqual(module.__abspath__, module.package_path)
def test_memoization_fail(self):
- from pyramid.tests import test_path
+ from . import test_path
module = DummyPackageOrModule(test_path, raise_exc=TypeError)
result = self._callFUT(module)
self.assertFalse(hasattr(module, '__abspath__'))
@@ -132,15 +132,15 @@ class TestPackageOf(unittest.TestCase):
return package_of(package)
def test_it_package(self):
- from pyramid import tests
+ import tests
package = DummyPackageOrModule(tests)
result = self._callFUT(package)
self.assertEqual(result, tests)
def test_it_module(self):
- import pyramid.tests.test_path
- from pyramid import tests
- package = DummyPackageOrModule(pyramid.tests.test_path)
+ import tests.test_path
+ import tests
+ package = DummyPackageOrModule(tests.test_path)
result = self._callFUT(package)
self.assertEqual(result, tests)
@@ -150,22 +150,22 @@ class TestPackageName(unittest.TestCase):
return package_name(package)
def test_it_package(self):
- from pyramid import tests
+ import tests
package = DummyPackageOrModule(tests)
result = self._callFUT(package)
- self.assertEqual(result, 'pyramid.tests')
+ self.assertEqual(result, 'tests')
def test_it_namespace_package(self):
- from pyramid import tests
+ import tests
package = DummyNamespacePackage(tests)
result = self._callFUT(package)
- self.assertEqual(result, 'pyramid.tests')
+ self.assertEqual(result, 'tests')
def test_it_module(self):
- from pyramid.tests import test_path
+ from . import test_path
module = DummyPackageOrModule(test_path)
result = self._callFUT(module)
- self.assertEqual(result, 'pyramid.tests')
+ self.assertEqual(result, 'tests')
def test_it_None(self):
result = self._callFUT(None)
@@ -185,43 +185,43 @@ class TestResolver(unittest.TestCase):
return self._getTargetClass()(package)
def test_get_package_caller_package(self):
- import pyramid.tests
+ import tests
from pyramid.path import CALLER_PACKAGE
self.assertEqual(self._makeOne(CALLER_PACKAGE).get_package(),
- pyramid.tests)
+ tests)
def test_get_package_name_caller_package(self):
from pyramid.path import CALLER_PACKAGE
self.assertEqual(self._makeOne(CALLER_PACKAGE).get_package_name(),
- 'pyramid.tests')
+ 'tests')
def test_get_package_string(self):
- import pyramid.tests
- self.assertEqual(self._makeOne('pyramid.tests').get_package(),
- pyramid.tests)
+ import tests
+ self.assertEqual(self._makeOne('tests').get_package(),
+ tests)
def test_get_package_name_string(self):
- self.assertEqual(self._makeOne('pyramid.tests').get_package_name(),
- 'pyramid.tests')
+ self.assertEqual(self._makeOne('tests').get_package_name(),
+ 'tests')
class TestAssetResolver(unittest.TestCase):
def _getTargetClass(self):
from pyramid.path import AssetResolver
return AssetResolver
- def _makeOne(self, package='pyramid.tests'):
+ def _makeOne(self, package='tests'):
return self._getTargetClass()(package)
def test_ctor_as_package(self):
import sys
- tests = sys.modules['pyramid.tests']
+ tests = sys.modules['tests']
inst = self._makeOne(tests)
self.assertEqual(inst.package, tests)
def test_ctor_as_str(self):
import sys
- tests = sys.modules['pyramid.tests']
- inst = self._makeOne('pyramid.tests')
+ tests = sys.modules['tests']
+ inst = self._makeOne('tests')
self.assertEqual(inst.package, tests)
def test_resolve_abspath(self):
@@ -234,13 +234,13 @@ class TestAssetResolver(unittest.TestCase):
def test_resolve_absspec(self):
from pyramid.path import PkgResourcesAssetDescriptor
inst = self._makeOne(None)
- r = inst.resolve('pyramid.tests:test_asset.py')
+ r = inst.resolve('tests:test_asset.py')
self.assertEqual(r.__class__, PkgResourcesAssetDescriptor)
self.assertTrue(r.exists())
def test_resolve_relspec_with_pkg(self):
from pyramid.path import PkgResourcesAssetDescriptor
- inst = self._makeOne('pyramid.tests')
+ inst = self._makeOne('tests')
r = inst.resolve('test_asset.py')
self.assertEqual(r.__class__, PkgResourcesAssetDescriptor)
self.assertTrue(r.exists())
@@ -262,7 +262,7 @@ class TestPkgResourcesAssetDescriptor(unittest.TestCase):
from pyramid.path import PkgResourcesAssetDescriptor
return PkgResourcesAssetDescriptor
- def _makeOne(self, pkg='pyramid.tests', path='test_asset.py'):
+ def _makeOne(self, pkg='tests', path='test_asset.py'):
return self._getTargetClass()(pkg, path)
def test_class_conforms_to_IAssetDescriptor(self):
@@ -277,7 +277,7 @@ class TestPkgResourcesAssetDescriptor(unittest.TestCase):
def test_absspec(self):
inst = self._makeOne()
- self.assertEqual(inst.absspec(), 'pyramid.tests:test_asset.py')
+ self.assertEqual(inst.absspec(), 'tests:test_asset.py')
def test_abspath(self):
inst = self._makeOne()
@@ -289,28 +289,28 @@ class TestPkgResourcesAssetDescriptor(unittest.TestCase):
inst.pkg_resources.resource_stream = lambda x, y: '%s:%s' % (x, y)
s = inst.stream()
self.assertEqual(s,
- '%s:%s' % ('pyramid.tests', 'test_asset.py'))
+ '%s:%s' % ('tests', 'test_asset.py'))
def test_isdir(self):
inst = self._makeOne()
inst.pkg_resources = DummyPkgResource()
inst.pkg_resources.resource_isdir = lambda x, y: '%s:%s' % (x, y)
self.assertEqual(inst.isdir(),
- '%s:%s' % ('pyramid.tests', 'test_asset.py'))
+ '%s:%s' % ('tests', 'test_asset.py'))
def test_listdir(self):
inst = self._makeOne()
inst.pkg_resources = DummyPkgResource()
inst.pkg_resources.resource_listdir = lambda x, y: '%s:%s' % (x, y)
self.assertEqual(inst.listdir(),
- '%s:%s' % ('pyramid.tests', 'test_asset.py'))
+ '%s:%s' % ('tests', 'test_asset.py'))
def test_exists(self):
inst = self._makeOne()
inst.pkg_resources = DummyPkgResource()
inst.pkg_resources.resource_exists = lambda x, y: '%s:%s' % (x, y)
self.assertEqual(inst.exists(),
- '%s:%s' % ('pyramid.tests', 'test_asset.py'))
+ '%s:%s' % ('tests', 'test_asset.py'))
class TestFSAssetDescriptor(unittest.TestCase):
def _getTargetClass(self):
@@ -385,7 +385,7 @@ class TestDottedNameResolver(unittest.TestCase):
def test_zope_dottedname_style_resolve_absolute(self):
typ = self._makeOne()
result = typ._zope_dottedname_style(
- 'pyramid.tests.test_path.TestDottedNameResolver', None)
+ 'tests.test_path.TestDottedNameResolver', None)
self.assertEqual(result, self.__class__)
def test_zope_dottedname_style_irrresolveable_absolute(self):
@@ -394,24 +394,24 @@ class TestDottedNameResolver(unittest.TestCase):
'pyramid.test_path.nonexisting_name', None)
def test__zope_dottedname_style_resolve_relative(self):
- import pyramid.tests
+ import tests
typ = self._makeOne()
result = typ._zope_dottedname_style(
- '.test_path.TestDottedNameResolver', pyramid.tests)
+ '.test_path.TestDottedNameResolver', tests)
self.assertEqual(result, self.__class__)
def test__zope_dottedname_style_resolve_relative_leading_dots(self):
- import pyramid.tests.test_path
+ import tests.test_path
typ = self._makeOne()
result = typ._zope_dottedname_style(
- '..tests.test_path.TestDottedNameResolver', pyramid.tests)
+ '..tests.test_path.TestDottedNameResolver', tests)
self.assertEqual(result, self.__class__)
def test__zope_dottedname_style_resolve_relative_is_dot(self):
- import pyramid.tests
+ import tests
typ = self._makeOne()
- result = typ._zope_dottedname_style('.', pyramid.tests)
- self.assertEqual(result, pyramid.tests)
+ result = typ._zope_dottedname_style('.', tests)
+ self.assertEqual(result, tests)
def test__zope_dottedname_style_irresolveable_relative_is_dot(self):
typ = self._makeOne()
@@ -428,16 +428,15 @@ class TestDottedNameResolver(unittest.TestCase):
"relative name '.whatever' irresolveable without package")
def test_zope_dottedname_style_irrresolveable_relative(self):
- import pyramid.tests
+ import tests
typ = self._makeOne()
self.assertRaises(ImportError, typ._zope_dottedname_style,
- '.notexisting', pyramid.tests)
+ '.notexisting', tests)
def test__zope_dottedname_style_resolveable_relative(self):
- import pyramid
+ import tests
typ = self._makeOne()
- result = typ._zope_dottedname_style('.tests', pyramid)
- from pyramid import tests
+ result = typ._zope_dottedname_style('.', tests)
self.assertEqual(result, tests)
def test__zope_dottedname_style_irresolveable_absolute(self):
@@ -449,32 +448,32 @@ class TestDottedNameResolver(unittest.TestCase):
def test__zope_dottedname_style_resolveable_absolute(self):
typ = self._makeOne()
result = typ._zope_dottedname_style(
- 'pyramid.tests.test_path.TestDottedNameResolver', None)
+ 'tests.test_path.TestDottedNameResolver', None)
self.assertEqual(result, self.__class__)
def test__pkg_resources_style_resolve_absolute(self):
typ = self._makeOne()
result = typ._pkg_resources_style(
- 'pyramid.tests.test_path:TestDottedNameResolver', None)
+ 'tests.test_path:TestDottedNameResolver', None)
self.assertEqual(result, self.__class__)
def test__pkg_resources_style_irrresolveable_absolute(self):
typ = self._makeOne()
self.assertRaises(ImportError, typ._pkg_resources_style,
- 'pyramid.tests:nonexisting', None)
+ 'tests:nonexisting', None)
def test__pkg_resources_style_resolve_relative(self):
- import pyramid.tests
+ import tests
typ = self._makeOne()
result = typ._pkg_resources_style(
- '.test_path:TestDottedNameResolver', pyramid.tests)
+ '.test_path:TestDottedNameResolver', tests)
self.assertEqual(result, self.__class__)
def test__pkg_resources_style_resolve_relative_is_dot(self):
- import pyramid.tests
+ import tests
typ = self._makeOne()
- result = typ._pkg_resources_style('.', pyramid.tests)
- self.assertEqual(result, pyramid.tests)
+ result = typ._pkg_resources_style('.', tests)
+ self.assertEqual(result, tests)
def test__pkg_resources_style_resolve_relative_nocurrentpackage(self):
typ = self._makeOne()
@@ -495,13 +494,13 @@ class TestDottedNameResolver(unittest.TestCase):
def test_resolve_using_pkgresources_style(self):
typ = self._makeOne()
result = typ.resolve(
- 'pyramid.tests.test_path:TestDottedNameResolver')
+ 'tests.test_path:TestDottedNameResolver')
self.assertEqual(result, self.__class__)
def test_resolve_using_zope_dottedname_style(self):
typ = self._makeOne()
result = typ.resolve(
- 'pyramid.tests.test_path:TestDottedNameResolver')
+ 'tests.test_path:TestDottedNameResolver')
self.assertEqual(result, self.__class__)
def test_resolve_missing_raises(self):
@@ -521,28 +520,28 @@ class TestDottedNameResolver(unittest.TestCase):
self.__class__)
def test_ctor_string_module_resolveable(self):
- import pyramid.tests
- typ = self._makeOne('pyramid.tests.test_path')
- self.assertEqual(typ.package, pyramid.tests)
+ import tests
+ typ = self._makeOne('tests.test_path')
+ self.assertEqual(typ.package, tests)
def test_ctor_string_package_resolveable(self):
- import pyramid.tests
- typ = self._makeOne('pyramid.tests')
- self.assertEqual(typ.package, pyramid.tests)
+ import tests
+ typ = self._makeOne('tests')
+ self.assertEqual(typ.package, tests)
def test_ctor_string_irresolveable(self):
self.assertRaises(ValueError, self._makeOne, 'cant.be.found')
def test_ctor_module(self):
- import pyramid.tests
- import pyramid.tests.test_path
- typ = self._makeOne(pyramid.tests.test_path)
- self.assertEqual(typ.package, pyramid.tests)
+ import tests
+ from . import test_path
+ typ = self._makeOne(test_path)
+ self.assertEqual(typ.package, tests)
def test_ctor_package(self):
- import pyramid.tests
- typ = self._makeOne(pyramid.tests)
- self.assertEqual(typ.package, pyramid.tests)
+ import tests
+ typ = self._makeOne(tests)
+ self.assertEqual(typ.package, tests)
def test_ctor_None(self):
typ = self._makeOne(None)
diff --git a/pyramid/tests/test_predicates.py b/tests/test_predicates.py
index da0b44708..da0b44708 100644
--- a/pyramid/tests/test_predicates.py
+++ b/tests/test_predicates.py
diff --git a/pyramid/tests/test_registry.py b/tests/test_registry.py
index aa44b5408..a07c7660d 100644
--- a/pyramid/tests/test_registry.py
+++ b/tests/test_registry.py
@@ -29,7 +29,7 @@ class TestRegistry(unittest.TestCase):
def test_default_package_name(self):
registry = self._makeOne()
- self.assertEqual(registry.package_name, 'pyramid.tests')
+ self.assertEqual(registry.package_name, 'tests')
def test_registerHandler_and_notify(self):
registry = self._makeOne()
diff --git a/pyramid/tests/test_renderers.py b/tests/test_renderers.py
index a2f7bf8c2..fce902662 100644
--- a/pyramid/tests/test_renderers.py
+++ b/tests/test_renderers.py
@@ -464,7 +464,7 @@ class Test_render(unittest.TestCase):
def _registerRenderer(self):
renderer = self.config.testing_add_renderer(
- 'pyramid.tests:abc/def.pt')
+ 'tests:abc/def.pt')
renderer.string_response = 'abc'
return renderer
@@ -485,11 +485,11 @@ class Test_render(unittest.TestCase):
renderer.assert_(request=request)
def test_it_with_package(self):
- import pyramid.tests
+ import tests
renderer = self._registerRenderer()
request = testing.DummyRequest()
result = self._callFUT('abc/def.pt', dict(a=1), request=request,
- package=pyramid.tests)
+ package=tests)
self.assertEqual(result, 'abc')
renderer.assert_(a=1)
renderer.assert_(request=request)
@@ -533,7 +533,7 @@ class Test_render_to_response(unittest.TestCase):
def test_it_no_request(self):
renderer = self.config.testing_add_renderer(
- 'pyramid.tests:abc/def.pt')
+ 'tests:abc/def.pt')
renderer.string_response = 'abc'
response = self._callFUT('abc/def.pt', dict(a=1))
self.assertEqual(response.body, b'abc')
@@ -542,7 +542,7 @@ class Test_render_to_response(unittest.TestCase):
def test_it_with_request(self):
renderer = self.config.testing_add_renderer(
- 'pyramid.tests:abc/def.pt')
+ 'tests:abc/def.pt')
renderer.string_response = 'abc'
request = testing.DummyRequest()
response = self._callFUT('abc/def.pt',
@@ -552,13 +552,13 @@ class Test_render_to_response(unittest.TestCase):
renderer.assert_(request=request)
def test_it_with_package(self):
- import pyramid.tests
+ import tests
renderer = self.config.testing_add_renderer(
- 'pyramid.tests:abc/def.pt')
+ 'tests:abc/def.pt')
renderer.string_response = 'abc'
request = testing.DummyRequest()
response = self._callFUT('abc/def.pt', dict(a=1), request=request,
- package=pyramid.tests)
+ package=tests)
self.assertEqual(response.body, b'abc')
renderer.assert_(a=1)
renderer.assert_(request=request)
@@ -613,20 +613,20 @@ class Test_get_renderer(unittest.TestCase):
def test_it_no_package(self):
renderer = self.config.testing_add_renderer(
- 'pyramid.tests:abc/def.pt')
+ 'tests:abc/def.pt')
result = self._callFUT('abc/def.pt')
self.assertEqual(result, renderer)
def test_it_with_package(self):
- import pyramid.tests
+ import tests
renderer = self.config.testing_add_renderer(
- 'pyramid.tests:abc/def.pt')
- result = self._callFUT('abc/def.pt', package=pyramid.tests)
+ 'tests:abc/def.pt')
+ result = self._callFUT('abc/def.pt', package=tests)
self.assertEqual(result, renderer)
def test_it_with_registry(self):
renderer = self.config.testing_add_renderer(
- 'pyramid.tests:abc/def.pt')
+ 'tests:abc/def.pt')
result = self._callFUT('abc/def.pt', registry=self.config.registry)
self.assertEqual(result, renderer)
@@ -634,7 +634,7 @@ class Test_get_renderer(unittest.TestCase):
from pyramid.config import Configurator
isolated_config = Configurator()
renderer = isolated_config.testing_add_renderer(
- 'pyramid.tests:abc/def.pt')
+ 'tests:abc/def.pt')
result = self._callFUT('abc/def.pt', registry=isolated_config.registry)
self.assertEqual(result, renderer)
diff --git a/pyramid/tests/test_request.py b/tests/test_request.py
index c79c84d63..c79c84d63 100644
--- a/pyramid/tests/test_request.py
+++ b/tests/test_request.py
diff --git a/pyramid/tests/test_response.py b/tests/test_response.py
index 53e3ce17a..53e3ce17a 100644
--- a/pyramid/tests/test_response.py
+++ b/tests/test_response.py
diff --git a/pyramid/tests/test_router.py b/tests/test_router.py
index 6097018f0..6097018f0 100644
--- a/pyramid/tests/test_router.py
+++ b/tests/test_router.py
diff --git a/pyramid/tests/test_scaffolds/__init__.py b/tests/test_scaffolds/__init__.py
index 5bb534f79..5bb534f79 100644
--- a/pyramid/tests/test_scaffolds/__init__.py
+++ b/tests/test_scaffolds/__init__.py
diff --git a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/.badfile b/tests/test_scaffolds/fixture_scaffold/+package+/.badfile
index e69de29bb..e69de29bb 100644
--- a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/.badfile
+++ b/tests/test_scaffolds/fixture_scaffold/+package+/.badfile
diff --git a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/__init__.py_tmpl b/tests/test_scaffolds/fixture_scaffold/+package+/__init__.py_tmpl
index d763b2435..d763b2435 100644
--- a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/__init__.py_tmpl
+++ b/tests/test_scaffolds/fixture_scaffold/+package+/__init__.py_tmpl
diff --git a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/resources.py b/tests/test_scaffolds/fixture_scaffold/+package+/resources.py
index 3d811895c..3d811895c 100644
--- a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/resources.py
+++ b/tests/test_scaffolds/fixture_scaffold/+package+/resources.py
diff --git a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/favicon.ico b/tests/test_scaffolds/fixture_scaffold/+package+/static/favicon.ico
index 71f837c9e..71f837c9e 100644
--- a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/favicon.ico
+++ b/tests/test_scaffolds/fixture_scaffold/+package+/static/favicon.ico
Binary files differ
diff --git a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/footerbg.png b/tests/test_scaffolds/fixture_scaffold/+package+/static/footerbg.png
index 1fbc873da..1fbc873da 100644
--- a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/footerbg.png
+++ b/tests/test_scaffolds/fixture_scaffold/+package+/static/footerbg.png
Binary files differ
diff --git a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/headerbg.png b/tests/test_scaffolds/fixture_scaffold/+package+/static/headerbg.png
index 0596f2020..0596f2020 100644
--- a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/headerbg.png
+++ b/tests/test_scaffolds/fixture_scaffold/+package+/static/headerbg.png
Binary files differ
diff --git a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/ie6.css b/tests/test_scaffolds/fixture_scaffold/+package+/static/ie6.css
index b7c8493d8..b7c8493d8 100644
--- a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/ie6.css
+++ b/tests/test_scaffolds/fixture_scaffold/+package+/static/ie6.css
diff --git a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/middlebg.png b/tests/test_scaffolds/fixture_scaffold/+package+/static/middlebg.png
index 2369cfb7d..2369cfb7d 100644
--- a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/middlebg.png
+++ b/tests/test_scaffolds/fixture_scaffold/+package+/static/middlebg.png
Binary files differ
diff --git a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/pylons.css b/tests/test_scaffolds/fixture_scaffold/+package+/static/pylons.css
index c54499ddd..c54499ddd 100644
--- a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/pylons.css
+++ b/tests/test_scaffolds/fixture_scaffold/+package+/static/pylons.css
diff --git a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/pyramid-small.png b/tests/test_scaffolds/fixture_scaffold/+package+/static/pyramid-small.png
index a5bc0ade7..a5bc0ade7 100644
--- a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/pyramid-small.png
+++ b/tests/test_scaffolds/fixture_scaffold/+package+/static/pyramid-small.png
Binary files differ
diff --git a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/pyramid.png b/tests/test_scaffolds/fixture_scaffold/+package+/static/pyramid.png
index 347e05549..347e05549 100644
--- a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/pyramid.png
+++ b/tests/test_scaffolds/fixture_scaffold/+package+/static/pyramid.png
Binary files differ
diff --git a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/transparent.gif b/tests/test_scaffolds/fixture_scaffold/+package+/static/transparent.gif
index 0341802e5..0341802e5 100644
--- a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/transparent.gif
+++ b/tests/test_scaffolds/fixture_scaffold/+package+/static/transparent.gif
Binary files differ
diff --git a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/templates/mytemplate.pt_tmpl b/tests/test_scaffolds/fixture_scaffold/+package+/templates/mytemplate.pt_tmpl
index f4d98ec29..f4d98ec29 100644
--- a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/templates/mytemplate.pt_tmpl
+++ b/tests/test_scaffolds/fixture_scaffold/+package+/templates/mytemplate.pt_tmpl
diff --git a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/test_no_content.py_tmpl b/tests/test_scaffolds/fixture_scaffold/+package+/test_no_content.py_tmpl
index e69de29bb..e69de29bb 100644
--- a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/test_no_content.py_tmpl
+++ b/tests/test_scaffolds/fixture_scaffold/+package+/test_no_content.py_tmpl
diff --git a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/tests.py_tmpl b/tests/test_scaffolds/fixture_scaffold/+package+/tests.py_tmpl
index 1627bf015..1627bf015 100644
--- a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/tests.py_tmpl
+++ b/tests/test_scaffolds/fixture_scaffold/+package+/tests.py_tmpl
diff --git a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/views.py_tmpl b/tests/test_scaffolds/fixture_scaffold/+package+/views.py_tmpl
index 12ed8832d..12ed8832d 100644
--- a/pyramid/tests/test_scaffolds/fixture_scaffold/+package+/views.py_tmpl
+++ b/tests/test_scaffolds/fixture_scaffold/+package+/views.py_tmpl
diff --git a/pyramid/tests/test_scaffolds/fixture_scaffold/CHANGES.txt_tmpl b/tests/test_scaffolds/fixture_scaffold/CHANGES.txt_tmpl
index 35a34f332..35a34f332 100644
--- a/pyramid/tests/test_scaffolds/fixture_scaffold/CHANGES.txt_tmpl
+++ b/tests/test_scaffolds/fixture_scaffold/CHANGES.txt_tmpl
diff --git a/pyramid/tests/test_scaffolds/fixture_scaffold/MANIFEST.in_tmpl b/tests/test_scaffolds/fixture_scaffold/MANIFEST.in_tmpl
index 0ff6eb7a0..0ff6eb7a0 100644
--- a/pyramid/tests/test_scaffolds/fixture_scaffold/MANIFEST.in_tmpl
+++ b/tests/test_scaffolds/fixture_scaffold/MANIFEST.in_tmpl
diff --git a/pyramid/tests/test_scaffolds/fixture_scaffold/README.txt_tmpl b/tests/test_scaffolds/fixture_scaffold/README.txt_tmpl
index 40f98d14a..40f98d14a 100644
--- a/pyramid/tests/test_scaffolds/fixture_scaffold/README.txt_tmpl
+++ b/tests/test_scaffolds/fixture_scaffold/README.txt_tmpl
diff --git a/pyramid/tests/test_scaffolds/fixture_scaffold/development.ini_tmpl b/tests/test_scaffolds/fixture_scaffold/development.ini_tmpl
index 01c504f99..01c504f99 100644
--- a/pyramid/tests/test_scaffolds/fixture_scaffold/development.ini_tmpl
+++ b/tests/test_scaffolds/fixture_scaffold/development.ini_tmpl
diff --git a/pyramid/tests/test_scaffolds/fixture_scaffold/production.ini_tmpl b/tests/test_scaffolds/fixture_scaffold/production.ini_tmpl
index becd3aa76..becd3aa76 100644
--- a/pyramid/tests/test_scaffolds/fixture_scaffold/production.ini_tmpl
+++ b/tests/test_scaffolds/fixture_scaffold/production.ini_tmpl
diff --git a/pyramid/tests/test_scaffolds/fixture_scaffold/setup.py_tmpl b/tests/test_scaffolds/fixture_scaffold/setup.py_tmpl
index ee9fd5fda..ee9fd5fda 100644
--- a/pyramid/tests/test_scaffolds/fixture_scaffold/setup.py_tmpl
+++ b/tests/test_scaffolds/fixture_scaffold/setup.py_tmpl
diff --git a/pyramid/tests/test_scaffolds/test_copydir.py b/tests/test_scaffolds/test_copydir.py
index 1e92b3c36..915cc5033 100644
--- a/pyramid/tests/test_scaffolds/test_copydir.py
+++ b/tests/test_scaffolds/test_copydir.py
@@ -9,7 +9,7 @@ class Test_copy_dir(unittest.TestCase):
from pyramid.compat import NativeIO
self.dirname = tempfile.mkdtemp()
self.out = NativeIO()
- self.fixturetuple = ('pyramid.tests.test_scaffolds',
+ self.fixturetuple = ('tests.test_scaffolds',
'fixture_scaffold')
def tearDown(self):
@@ -34,7 +34,7 @@ class Test_copy_dir(unittest.TestCase):
self.assertTrue(
'Copying fixture_scaffold/+package+/__init__.py_tmpl to' in result)
source = pkg_resources.resource_filename(
- 'pyramid.tests.test_scaffolds',
+ 'tests.test_scaffolds',
'fixture_scaffold/+package+/__init__.py_tmpl')
target = os.path.join(self.dirname, 'mypackage', '__init__.py')
with open(target, 'r') as f:
@@ -55,7 +55,7 @@ class Test_copy_dir(unittest.TestCase):
self.assertTrue('Creating' in result)
self.assertTrue('Copying __init__.py_tmpl to' in result)
source = pkg_resources.resource_filename(
- 'pyramid.tests.test_scaffolds',
+ 'tests.test_scaffolds',
'fixture_scaffold/+package+/__init__.py_tmpl')
target = os.path.join(self.dirname, 'mypackage', '__init__.py')
with open(target, 'r') as f:
@@ -328,8 +328,7 @@ class Test_query_interactive(unittest.TestCase):
from pyramid.compat import NativeIO
self.dirname = tempfile.mkdtemp()
self.out = NativeIO()
- self.fixturetuple = ('pyramid.tests.test_scaffolds',
- 'fixture_scaffold')
+ self.fixturetuple = ('tests.test_scaffolds', 'fixture_scaffold')
self.src_content = """\
These are not the droids
that you are looking for."""
diff --git a/pyramid/tests/test_scaffolds/test_init.py b/tests/test_scaffolds/test_init.py
index f4d1b287a..f4d1b287a 100644
--- a/pyramid/tests/test_scaffolds/test_init.py
+++ b/tests/test_scaffolds/test_init.py
diff --git a/pyramid/tests/test_scaffolds/test_template.py b/tests/test_scaffolds/test_template.py
index 98f2daf73..98f2daf73 100644
--- a/pyramid/tests/test_scaffolds/test_template.py
+++ b/tests/test_scaffolds/test_template.py
diff --git a/pyramid/tests/test_scripting.py b/tests/test_scripting.py
index ed88bb470..ed88bb470 100644
--- a/pyramid/tests/test_scripting.py
+++ b/tests/test_scripting.py
diff --git a/pyramid/tests/test_scripts/__init__.py b/tests/test_scripts/__init__.py
index 5bb534f79..5bb534f79 100644
--- a/pyramid/tests/test_scripts/__init__.py
+++ b/tests/test_scripts/__init__.py
diff --git a/pyramid/tests/test_scripts/dummy.py b/tests/test_scripts/dummy.py
index f1ef403f8..f1ef403f8 100644
--- a/pyramid/tests/test_scripts/dummy.py
+++ b/tests/test_scripts/dummy.py
diff --git a/pyramid/tests/test_scripts/pystartup.txt b/tests/test_scripts/pystartup.txt
index c62c4ca74..c62c4ca74 100644
--- a/pyramid/tests/test_scripts/pystartup.txt
+++ b/tests/test_scripts/pystartup.txt
diff --git a/pyramid/tests/test_scripts/test_common.py b/tests/test_scripts/test_common.py
index 60741db92..60741db92 100644
--- a/pyramid/tests/test_scripts/test_common.py
+++ b/tests/test_scripts/test_common.py
diff --git a/pyramid/tests/test_scripts/test_pcreate.py b/tests/test_scripts/test_pcreate.py
index 0286614ce..0286614ce 100644
--- a/pyramid/tests/test_scripts/test_pcreate.py
+++ b/tests/test_scripts/test_pcreate.py
diff --git a/pyramid/tests/test_scripts/test_pdistreport.py b/tests/test_scripts/test_pdistreport.py
index e229667c5..e229667c5 100644
--- a/pyramid/tests/test_scripts/test_pdistreport.py
+++ b/tests/test_scripts/test_pdistreport.py
diff --git a/pyramid/tests/test_scripts/test_prequest.py b/tests/test_scripts/test_prequest.py
index 75d5cc198..f7e656995 100644
--- a/pyramid/tests/test_scripts/test_prequest.py
+++ b/tests/test_scripts/test_prequest.py
@@ -1,5 +1,5 @@
import unittest
-from pyramid.tests.test_scripts import dummy
+from . import dummy
class TestPRequestCommand(unittest.TestCase):
def _getTargetClass(self):
diff --git a/pyramid/tests/test_scripts/test_proutes.py b/tests/test_scripts/test_proutes.py
index fab5e163e..0de331c94 100644
--- a/pyramid/tests/test_scripts/test_proutes.py
+++ b/tests/test_scripts/test_proutes.py
@@ -1,6 +1,6 @@
import os
import unittest
-from pyramid.tests.test_scripts import dummy
+from . import dummy
class DummyIntrospector(object):
@@ -160,7 +160,7 @@ class TestPRoutesCommand(unittest.TestCase):
compare_to = L[-1].split()[:3]
self.assertEqual(
compare_to,
- ['a', '/a', 'pyramid.tests.test_scripts.test_proutes.view']
+ ['a', '/a', 'tests.test_scripts.test_proutes.view']
)
def test_one_route_with_long_name_one_view_registered(self):
@@ -202,7 +202,7 @@ class TestPRoutesCommand(unittest.TestCase):
compare_to,
['very_long_name_123',
'/and_very_long_pattern_as_well',
- 'pyramid.tests.test_scripts.test_proutes.view']
+ 'tests.test_scripts.test_proutes.view']
)
def test_class_view(self):
@@ -228,7 +228,7 @@ class TestPRoutesCommand(unittest.TestCase):
compare_to = L[-1].split()
expected = [
'foo', '/a/b',
- 'pyramid.tests.test_scripts.dummy.DummyView.view', 'POST'
+ 'tests.test_scripts.dummy.DummyView.view', 'POST'
]
self.assertEqual(compare_to, expected)
@@ -296,8 +296,8 @@ class TestPRoutesCommand(unittest.TestCase):
self.assertEqual(result, 0)
self.assertEqual(len(L), 3)
compare_to = L[-1].split()[:3]
- view_module = 'pyramid.tests.test_scripts.dummy'
- view_str = '<pyramid.tests.test_scripts.dummy.DummyMultiView'
+ view_module = 'tests.test_scripts.dummy'
+ view_str = '<tests.test_scripts.dummy.DummyMultiView'
final = '%s.%s' % (view_module, view_str)
self.assertEqual(
@@ -337,7 +337,7 @@ class TestPRoutesCommand(unittest.TestCase):
compare_to = L[-1].split()
expected = [
'foo', '/a/b',
- 'pyramid.tests.test_scripts.test_proutes.view1', 'POST'
+ 'tests.test_scripts.test_proutes.view1', 'POST'
]
self.assertEqual(compare_to, expected)
@@ -364,7 +364,7 @@ class TestPRoutesCommand(unittest.TestCase):
compare_to = L[-1].split()
expected = [
'foo', '/a/b',
- 'pyramid.tests.test_scripts.test_proutes.view1', 'POST'
+ 'tests.test_scripts.test_proutes.view1', 'POST'
]
self.assertEqual(compare_to, expected)
@@ -392,7 +392,7 @@ class TestPRoutesCommand(unittest.TestCase):
compare_to = L[-1].split()
expected = [
'foo', '/a/b',
- 'pyramid.tests.test_scripts.test_proutes.view1', 'POST'
+ 'tests.test_scripts.test_proutes.view1', 'POST'
]
self.assertEqual(compare_to, expected)
@@ -420,7 +420,7 @@ class TestPRoutesCommand(unittest.TestCase):
compare_to = L[-1].split()
expected = [
'foo', '/a/b',
- 'pyramid.tests.test_scripts.test_proutes.view1',
+ 'tests.test_scripts.test_proutes.view1',
'<route', 'mismatch>'
]
self.assertEqual(compare_to, expected)
@@ -446,7 +446,7 @@ class TestPRoutesCommand(unittest.TestCase):
expected = [
['__static/', '/static/*subpath',
- 'pyramid.tests.test_scripts:static/', '*'],
+ 'tests.test_scripts:static/', '*'],
['__static2/', '/static2/*subpath', path2 + os.sep, '*'],
['__pyramid_scaffold/', '/pyramid_scaffold/*subpath',
'pyramid:scaffolds/starter/+package+/static/', '*'],
@@ -531,7 +531,7 @@ class TestPRoutesCommand(unittest.TestCase):
compare_to = L[-1].split()
expected = [
'foo', '/a/b',
- 'pyramid.tests.test_scripts.test_proutes.view1',
+ 'tests.test_scripts.test_proutes.view1',
'GET'
]
self.assertEqual(compare_to, expected)
@@ -561,7 +561,7 @@ class TestPRoutesCommand(unittest.TestCase):
compare_to = L[-1].split()
expected = [
'foo', '/a/b',
- 'pyramid.tests.test_scripts.test_proutes.view1',
+ 'tests.test_scripts.test_proutes.view1',
'!POST,*'
]
self.assertEqual(compare_to, expected)
@@ -602,7 +602,7 @@ class TestPRoutesCommand(unittest.TestCase):
compare_to = L[-1].split()
expected = [
'foo', '/a/b',
- 'pyramid.tests.test_scripts.test_proutes.view1',
+ 'tests.test_scripts.test_proutes.view1',
'!POST,*'
]
self.assertEqual(compare_to, expected)
diff --git a/pyramid/tests/test_scripts/test_pserve.py b/tests/test_scripts/test_pserve.py
index 485cf38cb..0c46b5348 100644
--- a/pyramid/tests/test_scripts/test_pserve.py
+++ b/tests/test_scripts/test_pserve.py
@@ -1,6 +1,6 @@
import os
import unittest
-from pyramid.tests.test_scripts import dummy
+from . import dummy
here = os.path.abspath(os.path.dirname(__file__))
@@ -55,7 +55,7 @@ class TestPServeCommand(unittest.TestCase):
inst = self._makeOne('development.ini')
loader = self.loader('/base/path.ini')
loader.settings = {'pserve': {
- 'watch_files': 'foo\n/baz\npyramid.tests.test_scripts:*.py',
+ 'watch_files': 'foo\n/baz\ntests.test_scripts:*.py',
}}
inst.pserve_file_config(loader, global_conf={'a': '1'})
self.assertEqual(loader.calls[0]['defaults'], {
diff --git a/pyramid/tests/test_scripts/test_pshell.py b/tests/test_scripts/test_pshell.py
index df664bea9..291714340 100644
--- a/pyramid/tests/test_scripts/test_pshell.py
+++ b/tests/test_scripts/test_pshell.py
@@ -1,6 +1,6 @@
import os
import unittest
-from pyramid.tests.test_scripts import dummy
+from . import dummy
class TestPShellCommand(unittest.TestCase):
diff --git a/pyramid/tests/test_scripts/test_ptweens.py b/tests/test_scripts/test_ptweens.py
index 6907b858d..4ad015249 100644
--- a/pyramid/tests/test_scripts/test_ptweens.py
+++ b/tests/test_scripts/test_ptweens.py
@@ -1,5 +1,5 @@
import unittest
-from pyramid.tests.test_scripts import dummy
+from . import dummy
class TestPTweensCommand(unittest.TestCase):
def _getTargetClass(self):
diff --git a/pyramid/tests/test_scripts/test_pviews.py b/tests/test_scripts/test_pviews.py
index 6ec9defbd..999028f28 100644
--- a/pyramid/tests/test_scripts/test_pviews.py
+++ b/tests/test_scripts/test_pviews.py
@@ -1,5 +1,5 @@
import unittest
-from pyramid.tests.test_scripts import dummy
+from . import dummy
class TestPViewsCommand(unittest.TestCase):
def _getTargetClass(self):
@@ -280,7 +280,7 @@ class TestPViewsCommand(unittest.TestCase):
self.assertEqual(L[3], ' context: context')
self.assertEqual(L[4], ' view name: a')
self.assertEqual(L[8],
- ' pyramid.tests.test_scripts.dummy.DummyView')
+ ' tests.test_scripts.dummy.DummyView')
def test_views_command_single_view_function_traversal(self):
from pyramid.registry import Registry
@@ -299,7 +299,7 @@ class TestPViewsCommand(unittest.TestCase):
self.assertEqual(L[3], ' context: context')
self.assertEqual(L[4], ' view name: a')
self.assertEqual(L[8],
- ' pyramid.tests.test_scripts.test_pviews.view')
+ ' tests.test_scripts.test_pviews.view')
def test_views_command_single_view_traversal_with_permission(self):
from pyramid.registry import Registry
@@ -318,7 +318,7 @@ class TestPViewsCommand(unittest.TestCase):
self.assertEqual(L[3], ' context: context')
self.assertEqual(L[4], ' view name: a')
self.assertEqual(L[8],
- ' pyramid.tests.test_scripts.dummy.DummyView')
+ ' tests.test_scripts.dummy.DummyView')
self.assertEqual(L[9], ' required permission = test')
def test_views_command_single_view_traversal_with_predicates(self):
@@ -340,7 +340,7 @@ class TestPViewsCommand(unittest.TestCase):
self.assertEqual(L[3], ' context: context')
self.assertEqual(L[4], ' view name: a')
self.assertEqual(L[8],
- ' pyramid.tests.test_scripts.dummy.DummyView')
+ ' tests.test_scripts.dummy.DummyView')
self.assertEqual(L[9], ' view predicates (predicate = x)')
def test_views_command_single_view_route(self):
@@ -366,7 +366,7 @@ class TestPViewsCommand(unittest.TestCase):
self.assertEqual(L[10], ' route path: /a')
self.assertEqual(L[11], ' subpath: ')
self.assertEqual(L[15],
- ' pyramid.tests.test_scripts.dummy.DummyView')
+ ' tests.test_scripts.dummy.DummyView')
def test_views_command_multi_view_nested(self):
from pyramid.registry import Registry
@@ -390,9 +390,9 @@ class TestPViewsCommand(unittest.TestCase):
self.assertEqual(L[3], ' context: context')
self.assertEqual(L[4], ' view name: a')
self.assertEqual(L[8],
- ' pyramid.tests.test_scripts.dummy.DummyMultiView')
+ ' tests.test_scripts.dummy.DummyMultiView')
self.assertEqual(L[12],
- ' pyramid.tests.test_scripts.dummy.view1.call')
+ ' tests.test_scripts.dummy.view1.call')
def test_views_command_single_view_route_with_route_predicates(self):
from pyramid.registry import Registry
@@ -420,7 +420,7 @@ class TestPViewsCommand(unittest.TestCase):
self.assertEqual(L[11], ' subpath: ')
self.assertEqual(L[12], ' route predicates (predicate = x)')
self.assertEqual(L[16],
- ' pyramid.tests.test_scripts.dummy.DummyView')
+ ' tests.test_scripts.dummy.DummyView')
def test_views_command_multiview(self):
from pyramid.registry import Registry
@@ -441,7 +441,7 @@ class TestPViewsCommand(unittest.TestCase):
self.assertEqual(L[3], ' context: context')
self.assertEqual(L[4], ' view name: a')
self.assertEqual(L[8],
- ' pyramid.tests.test_scripts.dummy.view.call')
+ ' tests.test_scripts.dummy.view.call')
def test_views_command_multiview_with_permission(self):
from pyramid.registry import Registry
@@ -463,7 +463,7 @@ class TestPViewsCommand(unittest.TestCase):
self.assertEqual(L[3], ' context: context')
self.assertEqual(L[4], ' view name: a')
self.assertEqual(L[8],
- ' pyramid.tests.test_scripts.dummy.view.call')
+ ' tests.test_scripts.dummy.view.call')
self.assertEqual(L[9], ' required permission = test')
def test_views_command_multiview_with_predicates(self):
@@ -488,7 +488,7 @@ class TestPViewsCommand(unittest.TestCase):
self.assertEqual(L[3], ' context: context')
self.assertEqual(L[4], ' view name: a')
self.assertEqual(L[8],
- ' pyramid.tests.test_scripts.dummy.view.call')
+ ' tests.test_scripts.dummy.view.call')
self.assertEqual(L[9], ' view predicates (predicate = x)')
class Test_main(unittest.TestCase):
diff --git a/pyramid/tests/test_security.py b/tests/test_security.py
index e5399ecdf..e5399ecdf 100644
--- a/pyramid/tests/test_security.py
+++ b/tests/test_security.py
diff --git a/pyramid/tests/test_session.py b/tests/test_session.py
index 3585ed635..6cd058bfb 100644
--- a/pyramid/tests/test_session.py
+++ b/tests/test_session.py
@@ -687,7 +687,7 @@ class TestPickleSerializer(unittest.TestCase):
def test_loads(self):
# generated from dumping Dummy() using protocol=2
- cstruct = b'\x80\x02cpyramid.tests.test_session\nDummy\nq\x00)\x81q\x01.'
+ cstruct = b'\x80\x02ctests.test_session\nDummy\nq\x00)\x81q\x01.'
serializer = self._makeOne()
result = serializer.loads(cstruct)
self.assertIsInstance(result, Dummy)
diff --git a/pyramid/tests/test_settings.py b/tests/test_settings.py
index a586cb6fd..a586cb6fd 100644
--- a/pyramid/tests/test_settings.py
+++ b/tests/test_settings.py
diff --git a/pyramid/tests/test_static.py b/tests/test_static.py
index f76cc5067..f34f8f943 100644
--- a/pyramid/tests/test_static.py
+++ b/tests/test_static.py
@@ -38,21 +38,21 @@ class Test_static_view_use_subpath_False(unittest.TestCase):
self.assertEqual(inst.index, 'index.html')
def test_call_adds_slash_path_info_empty(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest({'PATH_INFO':''})
context = DummyContext()
from pyramid.httpexceptions import HTTPMovedPermanently
self.assertRaises(HTTPMovedPermanently, inst, context, request)
def test_path_info_slash_means_index_html(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest()
context = DummyContext()
response = inst(context, request)
self.assertTrue(b'<html>static</html>' in response.body)
def test_oob_singledot(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest({'PATH_INFO':'/./index.html'})
context = DummyContext()
response = inst(context, request)
@@ -60,7 +60,7 @@ class Test_static_view_use_subpath_False(unittest.TestCase):
self.assertTrue(b'<html>static</html>' in response.body)
def test_oob_emptyelement(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest({'PATH_INFO':'//index.html'})
context = DummyContext()
response = inst(context, request)
@@ -68,14 +68,14 @@ class Test_static_view_use_subpath_False(unittest.TestCase):
self.assertTrue(b'<html>static</html>' in response.body)
def test_oob_dotdotslash(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest({'PATH_INFO':'/subdir/../../minimal.pt'})
context = DummyContext()
from pyramid.httpexceptions import HTTPNotFound
self.assertRaises(HTTPNotFound, inst, context, request)
def test_oob_dotdotslash_encoded(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest(
{'PATH_INFO':'/subdir/%2E%2E%2F%2E%2E/minimal.pt'})
context = DummyContext()
@@ -84,7 +84,7 @@ class Test_static_view_use_subpath_False(unittest.TestCase):
def test_oob_os_sep(self):
import os
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
dds = '..' + os.sep
request = self._makeRequest({'PATH_INFO':'/subdir/%s%sminimal.pt' %
(dds, dds)})
@@ -93,21 +93,21 @@ class Test_static_view_use_subpath_False(unittest.TestCase):
self.assertRaises(HTTPNotFound, inst, context, request)
def test_resource_doesnt_exist(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest({'PATH_INFO':'/notthere'})
context = DummyContext()
from pyramid.httpexceptions import HTTPNotFound
self.assertRaises(HTTPNotFound, inst, context, request)
def test_resource_isdir(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest({'PATH_INFO':'/subdir/'})
context = DummyContext()
response = inst(context, request)
self.assertTrue(b'<html>subdir</html>' in response.body)
def test_resource_is_file(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest({'PATH_INFO':'/index.html'})
context = DummyContext()
response = inst(context, request)
@@ -115,7 +115,7 @@ class Test_static_view_use_subpath_False(unittest.TestCase):
def test_resource_is_file_with_wsgi_file_wrapper(self):
from pyramid.response import _BLOCK_SIZE
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest({'PATH_INFO':'/index.html'})
class _Wrapper(object):
def __init__(self, file, block_size=None):
@@ -131,7 +131,7 @@ class Test_static_view_use_subpath_False(unittest.TestCase):
app_iter.file.close()
def test_resource_is_file_with_cache_max_age(self):
- inst = self._makeOne('pyramid.tests:fixtures/static', cache_max_age=600)
+ inst = self._makeOne('tests:fixtures/static', cache_max_age=600)
request = self._makeRequest({'PATH_INFO':'/index.html'})
context = DummyContext()
response = inst(context, request)
@@ -144,7 +144,7 @@ class Test_static_view_use_subpath_False(unittest.TestCase):
'Expires', 'Last-Modified'])
def test_resource_is_file_with_no_cache_max_age(self):
- inst = self._makeOne('pyramid.tests:fixtures/static',
+ inst = self._makeOne('tests:fixtures/static',
cache_max_age=None)
request = self._makeRequest({'PATH_INFO':'/index.html'})
context = DummyContext()
@@ -158,7 +158,7 @@ class Test_static_view_use_subpath_False(unittest.TestCase):
['Content-Length', 'Content-Type', 'Last-Modified'])
def test_resource_notmodified(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest({'PATH_INFO':'/index.html'})
request.if_modified_since = fiveyrsfuture
context = DummyContext()
@@ -172,14 +172,14 @@ class Test_static_view_use_subpath_False(unittest.TestCase):
app_iter.close()
def test_not_found(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest({'PATH_INFO':'/notthere.html'})
context = DummyContext()
from pyramid.httpexceptions import HTTPNotFound
self.assertRaises(HTTPNotFound, inst, context, request)
def test_gz_resource_no_content_encoding(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest({'PATH_INFO':'/arcs.svg.tgz'})
context = DummyContext()
response = inst(context, request)
@@ -189,7 +189,7 @@ class Test_static_view_use_subpath_False(unittest.TestCase):
response.app_iter.close()
def test_resource_no_content_encoding(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest({'PATH_INFO':'/index.html'})
context = DummyContext()
response = inst(context, request)
@@ -230,7 +230,7 @@ class Test_static_view_use_subpath_True(unittest.TestCase):
self.assertEqual(inst.index, 'index.html')
def test_call_adds_slash_path_info_empty(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest({'PATH_INFO':''})
request.subpath = ()
context = DummyContext()
@@ -238,7 +238,7 @@ class Test_static_view_use_subpath_True(unittest.TestCase):
self.assertRaises(HTTPMovedPermanently, inst, context, request)
def test_path_info_slash_means_index_html(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest()
request.subpath = ()
context = DummyContext()
@@ -246,7 +246,7 @@ class Test_static_view_use_subpath_True(unittest.TestCase):
self.assertTrue(b'<html>static</html>' in response.body)
def test_oob_singledot(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest()
request.subpath = ('.', 'index.html')
context = DummyContext()
@@ -254,7 +254,7 @@ class Test_static_view_use_subpath_True(unittest.TestCase):
self.assertRaises(HTTPNotFound, inst, context, request)
def test_oob_emptyelement(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest()
request.subpath = ('', 'index.html')
context = DummyContext()
@@ -262,7 +262,7 @@ class Test_static_view_use_subpath_True(unittest.TestCase):
self.assertRaises(HTTPNotFound, inst, context, request)
def test_oob_dotdotslash(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest()
request.subpath = ('subdir', '..', '..', 'minimal.pt')
context = DummyContext()
@@ -270,7 +270,7 @@ class Test_static_view_use_subpath_True(unittest.TestCase):
self.assertRaises(HTTPNotFound, inst, context, request)
def test_oob_dotdotslash_encoded(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest()
request.subpath = ('subdir', '%2E%2E', '%2E%2E', 'minimal.pt')
context = DummyContext()
@@ -279,7 +279,7 @@ class Test_static_view_use_subpath_True(unittest.TestCase):
def test_oob_os_sep(self):
import os
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
dds = '..' + os.sep
request = self._makeRequest()
request.subpath = ('subdir', dds, dds, 'minimal.pt')
@@ -288,7 +288,7 @@ class Test_static_view_use_subpath_True(unittest.TestCase):
self.assertRaises(HTTPNotFound, inst, context, request)
def test_resource_doesnt_exist(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest()
request.subpath = ('notthere,')
context = DummyContext()
@@ -296,7 +296,7 @@ class Test_static_view_use_subpath_True(unittest.TestCase):
self.assertRaises(HTTPNotFound, inst, context, request)
def test_resource_isdir(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest()
request.subpath = ('subdir',)
context = DummyContext()
@@ -304,7 +304,7 @@ class Test_static_view_use_subpath_True(unittest.TestCase):
self.assertTrue(b'<html>subdir</html>' in response.body)
def test_resource_is_file(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest()
request.subpath = ('index.html',)
context = DummyContext()
@@ -312,7 +312,7 @@ class Test_static_view_use_subpath_True(unittest.TestCase):
self.assertTrue(b'<html>static</html>' in response.body)
def test_resource_is_file_with_cache_max_age(self):
- inst = self._makeOne('pyramid.tests:fixtures/static', cache_max_age=600)
+ inst = self._makeOne('tests:fixtures/static', cache_max_age=600)
request = self._makeRequest()
request.subpath = ('index.html',)
context = DummyContext()
@@ -326,7 +326,7 @@ class Test_static_view_use_subpath_True(unittest.TestCase):
'Expires', 'Last-Modified'])
def test_resource_is_file_with_no_cache_max_age(self):
- inst = self._makeOne('pyramid.tests:fixtures/static',
+ inst = self._makeOne('tests:fixtures/static',
cache_max_age=None)
request = self._makeRequest()
request.subpath = ('index.html',)
@@ -341,7 +341,7 @@ class Test_static_view_use_subpath_True(unittest.TestCase):
['Content-Length', 'Content-Type', 'Last-Modified'])
def test_resource_notmodified(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest()
request.if_modified_since = fiveyrsfuture
request.subpath = ('index.html',)
@@ -356,7 +356,7 @@ class Test_static_view_use_subpath_True(unittest.TestCase):
app_iter.close()
def test_not_found(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
+ inst = self._makeOne('tests:fixtures/static')
request = self._makeRequest()
request.subpath = ('notthere.html',)
context = DummyContext()
@@ -423,7 +423,7 @@ class TestManifestCacheBuster(unittest.TestCase):
('css/main-test.css', {}))
def test_it_with_absspec(self):
- fut = self._makeOne('pyramid.tests:fixtures/manifest.json')
+ fut = self._makeOne('tests:fixtures/manifest.json')
self.assertEqual(fut('foo', 'bar', {}), ('bar', {}))
self.assertEqual(
fut('foo', 'css/main.css', {}),
diff --git a/pyramid/tests/test_testing.py b/tests/test_testing.py
index 86c219988..51ffb9822 100644
--- a/pyramid/tests/test_testing.py
+++ b/tests/test_testing.py
@@ -340,7 +340,7 @@ class Test_setUp(unittest.TestCase):
self.assertEqual(config.registry, current['registry'])
self.assertEqual(current['registry'].__class__, Registry)
self.assertEqual(current['request'], None)
- self.assertEqual(config.package.__name__, 'pyramid.tests')
+ self.assertEqual(config.package.__name__, 'tests')
self._assertSMHook(get_current_registry)
def test_it_with_registry(self):
diff --git a/pyramid/tests/test_threadlocal.py b/tests/test_threadlocal.py
index 088156507..088156507 100644
--- a/pyramid/tests/test_threadlocal.py
+++ b/tests/test_threadlocal.py
diff --git a/pyramid/tests/test_traversal.py b/tests/test_traversal.py
index 437fe46df..437fe46df 100644
--- a/pyramid/tests/test_traversal.py
+++ b/tests/test_traversal.py
diff --git a/pyramid/tests/test_tweens.py b/tests/test_tweens.py
index 2e74ad7cf..2e74ad7cf 100644
--- a/pyramid/tests/test_tweens.py
+++ b/tests/test_tweens.py
diff --git a/pyramid/tests/test_url.py b/tests/test_url.py
index 31b3dd571..3d161da21 100644
--- a/pyramid/tests/test_url.py
+++ b/tests/test_url.py
@@ -739,17 +739,17 @@ class TestURLMethodsMixin(unittest.TestCase):
result = request.static_url('static/foo.css')
self.assertEqual(result, 'abc')
self.assertEqual(info.args,
- ('pyramid.tests:static/foo.css', request, {}) )
+ ('tests:static/foo.css', request, {}) )
def test_static_url_abs(self):
from pyramid.interfaces import IStaticURLInfo
request = self._makeOne()
info = DummyStaticURLInfo('abc')
request.registry.registerUtility(info, IStaticURLInfo)
- result = request.static_url('pyramid.tests:static/foo.css')
+ result = request.static_url('tests:static/foo.css')
self.assertEqual(result, 'abc')
self.assertEqual(info.args,
- ('pyramid.tests:static/foo.css', request, {}) )
+ ('tests:static/foo.css', request, {}) )
def test_static_url_found_abs_no_registry_on_request(self):
from pyramid.interfaces import IStaticURLInfo
@@ -758,10 +758,10 @@ class TestURLMethodsMixin(unittest.TestCase):
info = DummyStaticURLInfo('abc')
registry.registerUtility(info, IStaticURLInfo)
del request.registry
- result = request.static_url('pyramid.tests:static/foo.css')
+ result = request.static_url('tests:static/foo.css')
self.assertEqual(result, 'abc')
self.assertEqual(info.args,
- ('pyramid.tests:static/foo.css', request, {}) )
+ ('tests:static/foo.css', request, {}) )
def test_static_url_abspath_integration_with_staticurlinfo(self):
from pyramid.interfaces import IStaticURLInfo
@@ -814,7 +814,7 @@ class TestURLMethodsMixin(unittest.TestCase):
result = request.static_path('static/foo.css')
self.assertEqual(result, 'abc')
self.assertEqual(info.args,
- ('pyramid.tests:static/foo.css', request,
+ ('tests:static/foo.css', request,
{'_app_url':'/foo'})
)
@@ -824,10 +824,10 @@ class TestURLMethodsMixin(unittest.TestCase):
request.script_name = '/foo'
info = DummyStaticURLInfo('abc')
request.registry.registerUtility(info, IStaticURLInfo)
- result = request.static_path('pyramid.tests:static/foo.css')
+ result = request.static_path('tests:static/foo.css')
self.assertEqual(result, 'abc')
self.assertEqual(info.args,
- ('pyramid.tests:static/foo.css', request,
+ ('tests:static/foo.css', request,
{'_app_url':'/foo'})
)
@@ -840,7 +840,7 @@ class TestURLMethodsMixin(unittest.TestCase):
result = request.static_path('static/foo.css')
self.assertEqual(result, 'abc')
self.assertEqual(info.args,
- ('pyramid.tests:static/foo.css', request,
+ ('tests:static/foo.css', request,
{'_app_url':'/foo'})
)
@@ -1103,7 +1103,7 @@ class Test_static_url(unittest.TestCase):
request = self._makeRequest()
result = self._callFUT('abc', request, _app_url='')
self.assertEqual(result, 'static url')
- self.assertEqual(request.path, 'pyramid.tests:abc')
+ self.assertEqual(request.path, 'tests:abc')
self.assertEqual(request.kw, {'_app_url':''})
class Test_static_path(unittest.TestCase):
@@ -1137,7 +1137,7 @@ class Test_static_path(unittest.TestCase):
request = self._makeRequest()
result = self._callFUT('abc', request, _app_url='')
self.assertEqual(result, 'static path')
- self.assertEqual(request.path, 'pyramid.tests:abc')
+ self.assertEqual(request.path, 'tests:abc')
self.assertEqual(request.kw, {'_app_url':''})
class Test_current_route_url(unittest.TestCase):
diff --git a/pyramid/tests/test_urldispatch.py b/tests/test_urldispatch.py
index 06f4ad793..06f4ad793 100644
--- a/pyramid/tests/test_urldispatch.py
+++ b/tests/test_urldispatch.py
diff --git a/pyramid/tests/test_util.py b/tests/test_util.py
index a76cd2017..469cabadb 100644
--- a/pyramid/tests/test_util.py
+++ b/tests/test_util.py
@@ -299,11 +299,11 @@ class Test_InstancePropertyMixin(unittest.TestCase):
def test_new_class_keeps_parent_module_name(self):
foo = self._makeOne()
- self.assertEqual(foo.__module__, 'pyramid.tests.test_util')
- self.assertEqual(foo.__class__.__module__, 'pyramid.tests.test_util')
+ self.assertEqual(foo.__module__, 'tests.test_util')
+ self.assertEqual(foo.__class__.__module__, 'tests.test_util')
foo.set_property(lambda _: 1, name='x', reify=True)
- self.assertEqual(foo.__module__, 'pyramid.tests.test_util')
- self.assertEqual(foo.__class__.__module__, 'pyramid.tests.test_util')
+ self.assertEqual(foo.__module__, 'tests.test_util')
+ self.assertEqual(foo.__class__.__module__, 'tests.test_util')
class Test_WeakOrderedSet(unittest.TestCase):
def _makeOne(self):
@@ -469,18 +469,18 @@ class Test_object_description(unittest.TestCase):
def test_method(self):
self.assertEqual(
self._callFUT(self.test_method),
- 'method test_method of class pyramid.tests.test_util.'
+ 'method test_method of class tests.test_util.'
'Test_object_description')
def test_class(self):
self.assertEqual(
self._callFUT(self.__class__),
- 'class pyramid.tests.test_util.Test_object_description')
+ 'class tests.test_util.Test_object_description')
def test_function(self):
self.assertEqual(
self._callFUT(dummyfunc),
- 'function pyramid.tests.test_util.dummyfunc')
+ 'function tests.test_util.dummyfunc')
def test_instance(self):
inst = Dummy()
diff --git a/pyramid/tests/test_view.py b/tests/test_view.py
index 3344bd739..279777f89 100644
--- a/pyramid/tests/test_view.py
+++ b/tests/test_view.py
@@ -545,7 +545,7 @@ class TestViewConfigDecorator(unittest.TestCase):
self.assertEqual(settings[0]['custom_predicates'], (1,))
def test_call_with_renderer_string(self):
- import pyramid.tests
+ import tests
decorator = self._makeOne(renderer='fixtures/minimal.pt')
venusian = DummyVenusian()
decorator.venusian = venusian
@@ -557,10 +557,10 @@ class TestViewConfigDecorator(unittest.TestCase):
self.assertEqual(len(settings), 1)
renderer = settings[0]['renderer']
self.assertEqual(renderer, 'fixtures/minimal.pt')
- self.assertEqual(config.pkg, pyramid.tests)
+ self.assertEqual(config.pkg, tests)
def test_call_with_renderer_dict(self):
- import pyramid.tests
+ import tests
decorator = self._makeOne(renderer={'a':1})
venusian = DummyVenusian()
decorator.venusian = venusian
@@ -571,10 +571,10 @@ class TestViewConfigDecorator(unittest.TestCase):
settings = config.settings
self.assertEqual(len(settings), 1)
self.assertEqual(settings[0]['renderer'], {'a':1})
- self.assertEqual(config.pkg, pyramid.tests)
+ self.assertEqual(config.pkg, tests)
def test_call_with_renderer_IRendererInfo(self):
- import pyramid.tests
+ import tests
from pyramid.interfaces import IRendererInfo
@implementer(IRendererInfo)
class DummyRendererHelper(object):
@@ -592,7 +592,7 @@ class TestViewConfigDecorator(unittest.TestCase):
self.assertEqual(len(settings), 1)
renderer = settings[0]['renderer']
self.assertTrue(renderer is renderer_helper)
- self.assertEqual(config.pkg, pyramid.tests)
+ self.assertEqual(config.pkg, tests)
def test_call_withdepth(self):
decorator = self._makeOne(_depth=1)
@@ -1027,7 +1027,7 @@ class IContext(Interface):
class DummyVenusianInfo(object):
scope = 'notaclass'
- module = sys.modules['pyramid.tests']
+ module = sys.modules['tests']
codeinfo = 'codeinfo'
class DummyVenusian(object):
diff --git a/pyramid/tests/test_viewderivers.py b/tests/test_viewderivers.py
index 6b81cc1e5..69dcc7d08 100644
--- a/pyramid/tests/test_viewderivers.py
+++ b/tests/test_viewderivers.py
@@ -47,7 +47,7 @@ class TestDeriveView(unittest.TestCase):
self.assertEqual(
e.args[0],
'Could not convert return value of the view callable function '
- 'pyramid.tests.test_viewderivers.view into a response '
+ 'tests.test_viewderivers.view into a response '
'object. The value returned was None. You may have forgotten '
'to return a value from the view callable.'
)
@@ -65,7 +65,7 @@ class TestDeriveView(unittest.TestCase):
self.assertEqual(
e.args[0],
"Could not convert return value of the view callable function "
- "pyramid.tests.test_viewderivers.view into a response "
+ "tests.test_viewderivers.view into a response "
"object. The value returned was {'a': 1}. You may have "
"forgotten to define a renderer in the view configuration."
)
@@ -85,7 +85,7 @@ class TestDeriveView(unittest.TestCase):
msg = e.args[0]
self.assertTrue(msg.startswith(
'Could not convert return value of the view callable object '
- '<pyramid.tests.test_viewderivers.'))
+ '<tests.test_viewderivers.'))
self.assertTrue(msg.endswith(
'> into a response object. The value returned was None. You '
'may have forgotten to return a value from the view callable.'))
@@ -129,7 +129,7 @@ class TestDeriveView(unittest.TestCase):
e.args[0],
'Could not convert return value of the view callable '
'method __call__ of '
- 'class pyramid.tests.test_viewderivers.AView into a '
+ 'class tests.test_viewderivers.AView into a '
'response object. The value returned was None. You may have '
'forgotten to return a value from the view callable.'
)
@@ -152,7 +152,7 @@ class TestDeriveView(unittest.TestCase):
e.args[0],
'Could not convert return value of the view callable '
'method theviewmethod of '
- 'class pyramid.tests.test_viewderivers.AView into a '
+ 'class tests.test_viewderivers.AView into a '
'response object. The value returned was None. You may have '
'forgotten to return a value from the view callable.'
)
diff --git a/pyramid/tests/test_wsgi.py b/tests/test_wsgi.py
index 4ddbc9201..4ddbc9201 100644
--- a/pyramid/tests/test_wsgi.py
+++ b/tests/test_wsgi.py
diff --git a/tox.ini b/tox.ini
index fac659258..6daa244ca 100644
--- a/tox.ini
+++ b/tox.ini
@@ -62,7 +62,7 @@ commands =
deps = virtualenv
[testenv:lint]
-skip_install = True
+skip_install = true
basepython = python3.5
commands =
flake8 pyramid/
@@ -95,7 +95,7 @@ extras =
# combination of versions of coverage and nosexcover that i can find.
[testenv:py2-cover]
commands =
- coverage run --source=pyramid {envbindir}/nosetests
+ coverage run {envbindir}/nosetests
coverage xml -o coverage-py2.xml
setenv =
COVERAGE_FILE=.coverage.py2
@@ -104,7 +104,7 @@ extras =
[testenv:py3-cover]
commands =
- coverage run --source=pyramid {envbindir}/nosetests
+ coverage run {envbindir}/nosetests
coverage xml -o coverage-py3.xml
setenv =
COVERAGE_FILE=.coverage.py3
@@ -112,14 +112,30 @@ extras =
testing
[testenv:coverage]
-skip_install = True
+skip_install = true
basepython = python3.5
commands =
coverage erase
coverage combine
coverage xml
- coverage report --show-missing --fail-under=100
+ coverage report --fail-under=100
deps =
coverage
setenv =
COVERAGE_FILE=.coverage
+
+[testenv:build]
+skip_install = true
+basepython = python3.6
+commands =
+ # clean up build/ and dist/ folders
+ python -c 'import shutil; shutil.rmtree("dist", ignore_errors=True)'
+ python setup.py clean --all
+ # build sdist
+ python setup.py sdist --dist-dir {toxinidir}/dist
+ # build wheel from sdist
+ pip wheel -v --no-deps --no-index --wheel-dir {toxinidir}/dist --find-links {toxinidir}/dist pyramid
+
+deps =
+ setuptools
+ wheel