当前位置:网站首页>unittest执行runTestCase提示<_io.TextIOWrapper name=‘<stderr>‘ mode=‘w‘ encoding=‘utf-8‘>解决方案
unittest执行runTestCase提示<_io.TextIOWrapper name=‘<stderr>‘ mode=‘w‘ encoding=‘utf-8‘>解决方案
2022-07-28 13:28:00 【乌11111】
参考:提示:<_io.TextIOWrapper name=‘<stderr>‘ mode=‘w‘ encoding=‘utf-8‘>
原因未知,但是看参考文章说是 HTMLTestRunner 的问题,改下对应的代码就可以了。
具体方案如下:
将HTMLTestRunner脚本的第631行的 :
print >> sys.stderr, ‘\nTime Elapsed: %s’ % (self.stopTime-self.startTime)
或:
print(sys.stderr, ‘\nTime Elapsed: %s’ % (self.stopTime-self.startTime))
修改为:
sys.stderr.write(’\nTime Elapsed: %s\n’ % (self.stopTime - self.startTime))
然后又有个小问题,HTMLTestRunner在哪,在python文件lib文件夹里。python在哪,win+r搞出来命令行黑窗口,输入 where python,就知道python在哪了。还有疑问就看参考链接吧。
边栏推荐
- Minitest -- applet automation testing framework
- Metersphere -- Open Source continuous testing platform
- How to configure ADB environment variables (where to open environment variables)
- Clickhouse distributed cluster construction
- 走进音视频的世界——FLV视频封装格式
- 离散对数问题(DLP) && Diffie-Hellman问题(DHP)
- Career planning of Software Test Engineer
- Custom Configuration Sections
- [ecmascript6] proxy and reflection
- QT自制软键盘 最完美、最简单、跟自带虚拟键盘一样
猜你喜欢

Leetcode 0142. circular linked list II

论文研读--Masked Generative Distillation

手机滚动截屏软件推荐

HCIP第十一天

阿里、京东、抖音:把云推向产业心脏

Clickhouse architecture and design

RSA encrypts data with private key and decrypts data with public key (not a signature verification process)

【服务器数据恢复】HP StorageWorks系列服务器RAID5两块盘离线的数据恢复

朗镜科技(Trax中国)“机器人+AI”开启中国零售元宇宙时代

文献阅读(245)Roller
随机推荐
How did Dongguan Huawei cloud data center become a new model of green data center?
qml 图片预览
目标检测:速度和准确性比较(Fater R-CNN,R-FCN,SSD,FPN,RetinaNet和YOLOv3)
Entering the world of audio and video -- flv video packaging format
力扣解法汇总1331-数组序号转换
Foundation of deep learning ---- GNN spectral domain and airspace (continuous improvement, update and accumulation)
Clickhouse distributed cluster construction
[lvgl events] Application of events on different components (I)
Clickhouse架构与设计
redis哨兵机制
Minitest -- applet automation testing framework
软件测试的发展与定义
修订版 | 目标检测:速度和准确性比较(Faster R-CNN,R-FCN,SSD,FPN,RetinaNet和YOLOv3)...
webSocket聊天
Three methods to disassemble the rotation array
Mobile phone scrolling screenshot software recommendation
【服务器数据恢复】HP StorageWorks系列服务器RAID5两块盘离线的数据恢复
Leetcode 105. construct binary tree from preorder and inorder traversal sequence & 106. construct binary tree from inorder and postorder traversal sequence
Several solutions to spanning
QML picture preview