Skip to content

Out of date assert hook documented #133

@bradleyayers

Description

@bradleyayers

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?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions