Skip to content

Commit

Permalink
Fix test failure
Browse files Browse the repository at this point in the history
We're importing zope.app.authentication as authentication, and then
trying to access zope.app.authentication.authentication.QuerySchemaSearchAdapter
without first explicitly importing zope.app.authentication.authentication.

It used to work because some other piece of test happened to import
zope.app.authentication.authentication first, but now it started failing
on winbot for no particular reason:
http://winbot.zope.org/builders/zope.app.authentication_py_265_32/builds/1454
  • Loading branch information
mgedmin committed Jan 7, 2015
1 parent 12e7421 commit 5545a30
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/zope/app/authentication/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,7 @@ queriables::
Before we illustrate how an authenticator is used by the PAU to search for
principals, we need to setup an adapter used by PAU::

>>> import zope.app.authentication.authentication
>>> provideAdapter(
... authentication.authentication.QuerySchemaSearchAdapter,
... provides=interfaces.IQueriableAuthenticator)
Expand Down

1 comment on commit 5545a30

@mgedmin
Copy link
Member Author

@mgedmin mgedmin commented on 5545a30 Jan 7, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I know why this used to work and then started failing last night: zope.testrunner 4.4.5 was released and it changed the ordering of test layers. Now unit tests are run first, so they can no longer rely on the functional test layer to import all the desired modules for them.

Please sign in to comment.