mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-07 14:58:56 +00:00
Fix Windows tests and add ClientPool fallback
This commit is contained in:
1
.github/workflows/python-ci.yml
vendored
1
.github/workflows/python-ci.yml
vendored
@@ -64,6 +64,7 @@ jobs:
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r src/requirements.txt
|
||||
- name: Run tests with coverage
|
||||
shell: bash
|
||||
run: |
|
||||
pytest --cov=src --cov-report=xml --cov-report=term-missing \
|
||||
--cov-fail-under=20 src/tests
|
||||
|
@@ -16,9 +16,26 @@ try:
|
||||
from monstr.encrypt import Keys, NIP4Encrypt
|
||||
from monstr.event.event import Event
|
||||
except ImportError: # Fallback placeholders when monstr is unavailable
|
||||
ClientPool = None
|
||||
NIP4Encrypt = None
|
||||
Event = None
|
||||
|
||||
class ClientPool: # minimal stub for tests when monstr is absent
|
||||
def __init__(self, relays):
|
||||
self.relays = relays
|
||||
self.connected = True
|
||||
|
||||
async def run(self):
|
||||
pass
|
||||
|
||||
def publish(self, event):
|
||||
pass
|
||||
|
||||
def subscribe(self, handlers=None, filters=None, sub_id=None):
|
||||
pass
|
||||
|
||||
def unsubscribe(self, sub_id):
|
||||
pass
|
||||
|
||||
from .coincurve_keys import Keys
|
||||
|
||||
import threading
|
||||
|
Reference in New Issue
Block a user