Metadata-Version: 2.1
Name: hellchin_lib
Version: 0.1.400
Summary: A Python library for soft assertions and flexible testing.
Author: hellchin
Author-email: your.email@example.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pytest>=6.0.0

# hellchin-lib

## 简介
个人开发使用的一些工具包，主要用于自动化测试，目前主要开发断言功能，支持软硬断言。

## 安装
```bash
pip install hellchin-lib
```

## 使用方法

！！！详细教程有空的时候再进行更新

建议教程如下：

示例代码：
```python
# !/usr/bin/env python
# -*- coding: utf-8 -*-
"""
 -------------------------------------------------
    File Name:     test_demo.py
    Description:   
 -------------------------------------------------
 """

from hellchin_lib import PostManAssertMethod, MethodAssert

pm = PostManAssertMethod()
pm.response = {
    "a": 1
}

# raise Exception("测试")
pm_code_test = """
# pm.expect(1).to.equal(2)
pm.test("", lambda: pm.expect('1').to.equal(1))
pm.test("失败断言", lambda: pm.expect(1).to.equal(2))
pm.test("", lambda: pm.expect(1).to.equal(1))
pm.test("成功断言", lambda: pm.expect(1).to.equal(1))
res = pm.response.json()
pm.test("undefined 测试", lambda: pm.expect(res.b).to.equal(1))
# pm.expect(res.b).to.equal(1)
"""

exec(pm_code_test, {"pm": pm})

ma_code_test = """
method_assert.check(1 == 1)
method_assert.check(1 == 2)
method_assert.equal(1, 1)
method_assert.equal(1, 2)
method_assert.exists(1)
method_assert.fail()
"""

# exec(ma_code_test, {"method_assert": MethodAssert()})

```


## 文档链接

更多文档请访问：None


# 更新日志

## [0.1.2] - 2024-12-27
### 新增
- pm 断言: 添加 undefined 处理

### 修复
- 修复了一些问题

### 改进
- 优化了一些细节代码和冗余
