-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(test): add doctest namespace (#25)
* chore(test): add doctest namespace Import JAX and NumPy in the doctest namespace to make examples less crowded by imports. * chore(ci): apply lint suggestions * fix(deps): conftest is now correctly removed * fix(test): impossible to test conftest not present * chore(ci): do not cover conftest * chore(lint): apply fixes * fix(ci): typo * fix(ci): omit conftest * chore(docs): remove trailing imports
- Loading branch information
Showing
7 changed files
with
28 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from typing import Any | ||
|
||
import jax | ||
import numpy | ||
import pytest | ||
|
||
|
||
@pytest.fixture(autouse=True) | ||
def add_doctest_modules(doctest_namespace: dict[str, Any]) -> None: | ||
doctest_namespace["jax"] = jax | ||
doctest_namespace["jnp"] = jax.numpy | ||
doctest_namespace["np"] = numpy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters