Skip to content

Commit a3ef5ae

Browse files
chord: fix build-test workflow.
1 parent aa4218a commit a3ef5ae

File tree

6 files changed

+213
-275
lines changed

6 files changed

+213
-275
lines changed

.github/workflows/build-test.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,16 @@ jobs:
4949
poetry run pylint bases/ components/ --exit-zero --output-format=colorized || true
5050
continue-on-error: true
5151

52-
- name: Run pytest
52+
- name: Run unit test
5353
run: |
54-
echo "Running pytest..."
55-
poetry run pytest -v --tb=short --mock-dev
54+
echo "Running unit pytest..."
55+
poetry run pytest -v --tb=short -m unit
56+
57+
58+
- name: Run integration test
59+
run: |
60+
echo "Running integration pytest..."
61+
poetry run pytest -v --tb=short --mock-dev -m integration
5662
5763
- name: Generate test summary
5864
if: always()

components/netdriver/utils/asyncu.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,21 @@ def decorator(func: Callable) -> Callable:
2727
@functools.wraps(func)
2828
async def wrapper(*args, **kwargs):
2929
actual_timeout = kwargs.pop(timeout_param, timeout)
30-
30+
3131
if not actual_timeout and args:
3232
instance = args[0]
3333
if hasattr(instance, f"_{func.__name__}_timeout"):
3434
actual_timeout = getattr(instance, f"_{func.__name__}_timeout")
3535
elif hasattr(instance, "default_timeout"):
3636
actual_timeout = getattr(instance, "default_timeout")
37-
37+
3838
if actual_timeout is None:
3939
return await func(*args, **kwargs)
40-
40+
4141
try:
4242
return await asyncio.wait_for(func(*args, **kwargs), timeout=actual_timeout)
4343
except asyncio.TimeoutError:
4444
raise AsyncTimeoutError(func.__name__, actual_timeout)
45-
45+
4646
return wrapper
4747
return decorator

0 commit comments

Comments
 (0)