Update Python version requirements and fix compatibility issues
- Bump minimum Python version from 3.11 to 3.13 across all apps - Add Python 3.11-3.13 test matrix to CLI workflow - Document Python 3.11+ requirement in .env.example - Fix Starlette Broadcast removal with in-process fallback implementation - Add _InProcessBroadcast class for tests when Starlette Broadcast is unavailable - Refactor API key validators to read live settings instead of cached values - Update database models with explicit
This commit is contained in:
@@ -97,7 +97,22 @@ class TestWalletCommands:
|
||||
assert result.exit_code == 0
|
||||
assert wallet_path.exists()
|
||||
|
||||
data = json.loads(result.output)
|
||||
# Strip ANSI color codes from output before JSON parsing
|
||||
import re
|
||||
ansi_escape = re.compile(r'\x1b(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])')
|
||||
clean_output = ansi_escape.sub('', result.output)
|
||||
|
||||
# Extract JSON from the cleaned output
|
||||
first_brace = clean_output.find('{')
|
||||
last_brace = clean_output.rfind('}')
|
||||
|
||||
if first_brace != -1 and last_brace != -1 and last_brace > first_brace:
|
||||
json_part = clean_output[first_brace:last_brace+1]
|
||||
data = json.loads(json_part)
|
||||
else:
|
||||
# Fallback to original behavior if no JSON found
|
||||
data = json.loads(clean_output)
|
||||
|
||||
assert data['balance'] == 0.0
|
||||
assert 'address' in data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user