| Age | Commit message (Collapse) | Author |
|
- update source files
- update project.png
- fix literalinclude reference in logging
|
|
|
|
- update starter scaffold tests and setup.py (used in `narr/project.rst` and `narr/testing.rst`)
- update links to documentation
|
|
- Update functional test with explicit instructions and to sync with actual starter scaffold
|
|
scaffold to reflect its current state
|
|
Wrap lines as per convention.
|
|
- Line numbers are mentioned only in the
Creating a Pyramid Project chapter; those
that are affected were updated.
|
|
using another WSGI server; random docs fixes
|
|
|
|
--------
- ``pyramid.testing.setUp`` and ``pyramid.testing.tearDown`` have been
undeprecated. They are now the canonical setup and teardown APIs for test
configuration, replacing "direct" creation of a Configurator. This is a
change designed to provide a facade that will protect against any future
Configurator deprecations.
Paster Templates
----------------
- All paster templates now use ``pyramid.testing.setUp`` and
``pyramid.testing.tearDown`` rather than creating a Configurator "by hand"
within their ``tests.py`` module, as per decision in features above.
Documentation
-------------
- The wiki and wiki2 tutorials now use ``pyramid.testing.setUp`` and
``pyramid.testing.tearDown`` rather than creating a Configurator "by hand",
as per decision in features above.
- The "Testing" narrative chapter now explains ``pyramid.testing.setUp`` and
``pyramid.testing.tearDown`` instead of Configurator creation and
``Configurator.begin()`` and ``Configurator.end()``.
|
|
|
|
|
|
|
|
--------
- The ``Configurator`` object now has two new methods: ``begin`` and
``end``. The ``begin`` method is meant to be called before any
"configuration" begins (e.g. before ``add_view``, et. al are
called). The ``end`` method is meant to be called after all
"configuration" is complete.
Previously, before there was imperative configuration at all (1.1
and prior), configuration begin and end was invariably implied by
the process of loading a ZCML file. When a ZCML load happened, the
threadlocal data structure containing the request and registry was
modified before the load, and torn down after the load, making sure
that all framework code that needed ``get_current_registry`` for the
duration of the ZCML load was satisfied.
Some API methods called during imperative configuration, (such as
``Configurator.add_view`` when a renderer is involved) end up for
historical reasons calling ``get_current_registry``. However, in
1.2a5 and below, the Configurator supplied no functionality that
allowed people to make sure that ``get_current_registry`` returned
the registry implied by the configurator being used. ``begin`` now
serves this purpose. Inversely, ``end`` pops the thread local
stack, undoing the actions of ``begin``.
We make this boundary explicit to reduce the potential for confusion
when the configurator is used in different circumstances (e.g. in
unit tests and app code vs. just in initial app setup).
Existing code written for 1.2a1-1.2a5 which does not call ``begin``
or ``end`` continues to work in the same manner it did before. It
is however suggested that this code be changed to call ``begin`` and
``end`` to reduce the potential for confusion in the future.
- All ``paster`` templates which generate an application skeleton now
make use of the new ``begin`` and ``end`` methods of the
Configurator they use in their respective copies of ``run.py`` and
``tests.py``.
Documentation
-------------
- All documentation that makes use of a ``Configurator`` object to do
application setup and test setup now makes use of the new ``begin``
and ``end`` methods of the configurator.
Bug Fixes
---------
- When a ``repoze.bfg.exceptions.NotFound`` or
``repoze.bfg.exceptions.Forbidden`` *class* (as opposed to instance)
was raised as an exception within a root factory (or route root
factory), the exception would not be caught properly by the
``repoze.bfg.`` Router and it would propagate to up the call stack,
as opposed to rendering the not found view or the forbidden view as
would have been expected.
|
|
|
|
|
|
|
|
|
|
|
|
tests can still use that function indefinitely. However, for
maximum forward compatibility, they should import ``cleanUp`` from
``repoze.bfg.testing`` instead of from ``zope.testing.cleanup``.
The BFG paster templates and docs have been changed to use this
function instead of the ``zope.testing.cleanup`` version.
|
|
|
|
method accepts keyword arguments. Each key/value pair in the
keyword arguments causes an assertion to be made that the renderer
received this key with a value equal to the asserted value.
- Projects generated by the paster templates now use the
``DummyTemplateRenderer.assert_`` method in their view tests.
|
|
Retain old test as an integration test. Update documentation.
|
|
|