Skip to content

Commit

Permalink
Fix tests when AppData is set in the environment
Browse files Browse the repository at this point in the history
  • Loading branch information
jwodder committed Jun 13, 2024
1 parent ca40ad7 commit 6368b08
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
v0.1.2 (in development)
-----------------------
- Fix tests when `AppData` is set in the environment

v0.1.1 (2024-06-12)
-------------------
- Always open hub configuration files using UTF-8 encoding
Expand Down
2 changes: 1 addition & 1 deletion src/ghtoken/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from dotenv import dotenv_values, find_dotenv
from ruamel.yaml import YAML

__version__ = "0.1.1"
__version__ = "0.1.2.dev1"
__author__ = "John Thorvald Wodder II"
__author_email__ = "[email protected]"
__license__ = "MIT"
Expand Down
2 changes: 2 additions & 0 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ def tmp_home(
monkeypatch.delenv("XDG_DATA_HOME", raising=False)
monkeypatch.delenv("XDG_RUNTIME_DIR", raising=False)
monkeypatch.delenv("XDG_STATE_HOME", raising=False)
# Unset AppData so that gh doesn't use it for locating its config file:
monkeypatch.delenv("AppData", raising=False)
monkeypatch.setenv("USERPROFILE", str(home))
monkeypatch.setenv("LOCALAPPDATA", str(home))
return home

0 comments on commit 6368b08

Please sign in to comment.