Out of date assert hook documented #133

Open
bradleyayers opened this Issue Apr 19, 2012 · 0 comments

Comments

Projects
None yet
1 participant
Collaborator

bradleyayers commented Apr 19, 2012

The documentation currently says that as long as you import attest before your tests, and your tests import assert_hook, everything will work. This is no longer the case with 0.6, assert import hook is only enabled if you use the attest command. If not using the attest command, what should be the recommended way to use the assert hook?

A working solution is to ensure the following is done before test modules are imported:

from attest import AssertImportHook
AssertImportHook.enable()

But is this what we should recommend as the official way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment