Merge commit '47296980495f8bbfc9493e93de85dd62de6fa6b9' as 'paste-framework'
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
"""
|
||||
测试 paste 包的基本导入和版本信息。
|
||||
无外部依赖,可离线运行。
|
||||
"""
|
||||
|
||||
import paste
|
||||
|
||||
|
||||
class TestPasteImport:
|
||||
"""测试 paste 包基础功能"""
|
||||
|
||||
def test_paste_imports(self):
|
||||
"""确保 paste 包能正确导入"""
|
||||
assert paste is not None
|
||||
|
||||
def test_paste_version(self):
|
||||
"""检查 paste 包是否有 __version__"""
|
||||
assert hasattr(paste, "__version__"), "paste package should have __version__"
|
||||
assert isinstance(paste.__version__, str), "__version__ should be a string"
|
||||
|
||||
def test_paste_version_value(self):
|
||||
"""验证版本号格式符合语义化版本规范"""
|
||||
import re
|
||||
version = paste.__version__
|
||||
assert re.match(r'^\d+\.\d+\.\d+', version), \
|
||||
f"Version {version} should follow semver format"
|
||||
Reference in New Issue
Block a user