Skip to content

Commit

Permalink
Add a test to cover core.disable. Reveals EncodingWarning. Ref #685
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jun 30, 2024
1 parent afe0abd commit 8e4e1d6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions keyring/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ def get_keyring() -> backend.KeyringBackend:
def disable() -> None:
"""
Configure the null keyring as the default.
>>> fs = getfixture('fs')
>>> disable()
>>> disable()
Traceback (most recent call last):
...
RuntimeError: Refusing to overwrite...
"""
root = platform.config_root()
try:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ test = [
"pytest-ruff >= 0.2.1",

# local
"pyfakefs",
]
doc = [
# upstream
Expand Down

0 comments on commit 8e4e1d6

Please sign in to comment.