Skip to content

Commit de398cf

Browse files
author
luk384090-cloud
committed
test(v2): Add sync/async interface parity tests
- Use AST parsing to compare method sets and parameter signatures between sync and async classes - Verify mechanically copied method bodies remain consistent after stripping async syntax - Maintain exemption list for structural differences like sync vs async generators - Implement auto-discovery mechanism to ensure all new async twins are covered by tests - Add guard tests to verify detectors accurately catch missing methods or parameter drift - Exclude legacy SDK and standalone submodule directories to prevent false positives
1 parent 78d0546 commit de398cf

2 files changed

Lines changed: 1247 additions & 0 deletions

File tree

‎tests/v2/__init__.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright (c) Alibaba, Inc. and its affiliates.
3+
"""Checks on the v2 SDK tree as a whole, rather than on one module.
4+
5+
These tests read the shipped source and assert structural invariants across
6+
it -- the sync/async twins expose the same contract, that sort of thing.
7+
They have no runtime counterpart to import, so they live apart from the flat
8+
per-module suites in ``tests/``.
9+
"""

0 commit comments

Comments
 (0)