Skip to content

Commit

Permalink
conftest: pydocstyle manual fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Nov 26, 2023
1 parent d1d73a6 commit a29dcc5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions conftest.py
Expand Up @@ -24,6 +24,7 @@ def add_doctest_fixtures(
request: pytest.FixtureRequest,
doctest_namespace: t.Dict[str, t.Any],
) -> None:
"""Harness pytest fixtures to doctest namespace."""
if isinstance(request._pyfuncitem, DoctestItem) and shutil.which("tmux"):
request.getfixturevalue("set_home")
doctest_namespace["request"] = request
Expand All @@ -34,6 +35,7 @@ def set_home(
monkeypatch: pytest.MonkeyPatch,
unihan_user_path: pathlib.Path,
) -> None:
"""Set home directory for pytest tests."""
monkeypatch.setenv("HOME", str(unihan_user_path))


Expand All @@ -44,5 +46,6 @@ def setup(
unihan_ensure_quick: None,
unihan_ensure_full: None,
) -> None:
"""Configure test fixtures for pytest."""
if USING_ZSH:
request.getfixturevalue("unihan_zshrc")

0 comments on commit a29dcc5

Please sign in to comment.