fix: resolve merge conflicts and lint issues
- Merge origin/main changes (flattened buy/sell commands, --doc flag, aliases) - Fix spinner placement for buy/sell commands - Fix duplicate alias key 'p' in canonical subcommands - Remove unused mypy ignore comments in spot_client.py - Fix nested with statements in tests Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,12 @@ import unittest
|
||||
from pathlib import Path
|
||||
from unittest.mock import patch
|
||||
|
||||
from coinhunter.config import ensure_init_files, get_binance_credentials, load_config, load_env_file
|
||||
from coinhunter.config import (
|
||||
ensure_init_files,
|
||||
get_binance_credentials,
|
||||
load_config,
|
||||
load_env_file,
|
||||
)
|
||||
from coinhunter.runtime import get_runtime_paths
|
||||
|
||||
|
||||
@@ -89,6 +94,8 @@ class ConfigRuntimeTestCase(unittest.TestCase):
|
||||
),
|
||||
):
|
||||
paths = get_runtime_paths()
|
||||
with patch("coinhunter.config.ensure_runtime_dirs", side_effect=PermissionError("no write access")):
|
||||
with self.assertRaisesRegex(RuntimeError, "Set COINHUNTER_HOME to a writable directory"):
|
||||
ensure_init_files(paths)
|
||||
with (
|
||||
patch("coinhunter.config.ensure_runtime_dirs", side_effect=PermissionError("no write access")),
|
||||
self.assertRaisesRegex(RuntimeError, "Set COINHUNTER_HOME to a writable directory"),
|
||||
):
|
||||
ensure_init_files(paths)
|
||||
|
||||
Reference in New Issue
Block a user