Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
test:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: ["3.14"]
uv-resolution:
- highest
Expand All @@ -37,7 +37,7 @@ jobs:
os: macos-latest
uv-resolution: lowest-direct
- python-version: "3.12"
os: ubuntu-latest
os: windows-latest
uv-resolution: highest
- python-version: "3.13"
os: macos-latest
Expand Down
31 changes: 22 additions & 9 deletions tests/utils.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import base64
import json
import os
import sys
from collections.abc import Generator
from contextlib import contextmanager
from pathlib import Path
from typing import Any, Union
from typing import Any


@contextmanager
def changing_dir(directory: Union[str, Path]) -> Generator[None, None, None]:
def changing_dir(directory: str | Path) -> Generator[None, None, None]:
initial_dir = os.getcwd()
os.chdir(directory)
try:
Expand All @@ -22,13 +23,25 @@ def build_logs_response(*logs: dict[str, Any]) -> str:
return "\n".join(json.dumps(log) for log in logs)


class Keys:
RIGHT_ARROW = "\x1b[C"
DOWN_ARROW = "\x1b[B"
ENTER = "\r"
CTRL_C = "\x03"
TAB = "\t"
BACKSPACE = "\x7f"
if sys.platform == "win32":

class Keys:
RIGHT_ARROW = "\xe0M"
DOWN_ARROW = "\xe0P"
ENTER = "\r"
CTRL_C = "\x03"
TAB = "\t"
BACKSPACE = "\x08"

else:

class Keys:
RIGHT_ARROW = "\x1b[C"
DOWN_ARROW = "\x1b[B"
ENTER = "\r"
CTRL_C = "\x03"
TAB = "\t"
BACKSPACE = "\x7f"


def create_jwt_token(payload: dict[str, Any]) -> str:
Expand Down