Skip to content

Commit

Permalink
data
Browse files Browse the repository at this point in the history
  • Loading branch information
deipss committed May 8, 2024
1 parent 9ef4ffa commit 95a7ce3
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 2 deletions.
65 changes: 65 additions & 0 deletions docs/Python/Pytest.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,68 @@ title: Pytest
parent: Python
---

# 文件加载

## path
```phthon
import json
import os
import yaml
if __name__ == '__main__':
print(__file__)
relpath = os.path.relpath(__file__)
print(os.path.split(relpath))
print(relpath)
print(os.getcwd())
path = os.path.join('dir1', 'dir2', 'file.txt')
print(path)
```

## json yaml
```python
import json
import os
import yaml
if __name__ == '__main__':
with open("demo.yaml", "r") as file:
data = yaml.safe_load(file)
print(data)
print(data['json'])

with open("demo.json", "r") as file:
data = json.load(file)
print(data['sites'])
```


# Pytest



# Allure


# Client


## mysql


## rocketmq


## redis


## es


# log


# python 部署

## 搜索可用的版本包
pip install requests==
2 changes: 1 addition & 1 deletion docs/Python/常用语句.md
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,7 @@ if __name__ == '__main__':
# 模块和包

每一个以 .py 结尾的python文件就是一个模块。
包是一个一个文件夹,下面有许多的模块

```python
import 模块名 # 导入单个模块
Expand All @@ -538,7 +539,6 @@ from time import sleep # 只导入模块中的sleep方法

from 模块名 import *
from time import * # 只导入模块中所有的函数

```


Expand Down
4 changes: 3 additions & 1 deletion docs/Reading/一个测试的三年工作总结 .md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ layout: default
title: 测试工程师的三年工作总结
parent: Reading
---
- https://mp.weixin.qq.com/s?__biz=MzkxMDM1NDQ0OA==&mid=2247501092&idx=2&sn=ff6fe29c32b0590feedd2577002600e8&chksm=c12e345bf659bd4d887eebffbdd2b3315bc0476431ef0a7e1f5da826be51bed24ddd686e46e4&scene=21#wechat_redirect


- 原文 https://mp.weixin.qq.com/s?__biz=MzkxMDM1NDQ0OA==&mid=2247501092&idx=2&sn=ff6fe29c32b0590feedd2577002600e8&chksm=c12e345bf659bd4d887eebffbdd2b3315bc0476431ef0a7e1f5da826be51bed24ddd686e46e4&scene=21#wechat_redirect

# 文摘

Expand Down

0 comments on commit 95a7ce3

Please sign in to comment.