Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out of date assert hook documented #133

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

Out of date assert hook documented #133

bradleyayers opened this issue Apr 19, 2012 · 0 comments

Comments

@bradleyayers
Copy link
Collaborator

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
Projects
None yet
Development

No branches or pull requests

1 participant