当前位置:网站首页>Pycharm跑程序时自动进入测试模式
Pycharm跑程序时自动进入测试模式
2022-07-25 20:44:00 【Channing Lewis】
今天跑代码时发现自动进入测试模式,但是我没有导入测试模块。后来发现是因为我的一个函数名以test开头,pycharm自动识别为测试代码了。
我的代码:
def test_ii():
print("hhh")
运行后:
但是我的虚拟机里的pycharm不会这样识别,同样的代码是正常运行的。
查看File->Settings->Tools->Python integrated Tools页面:
进入测试模式的pycharm:
可以看到默认的测试运行者是pytest。
不会进入测试模式的pycharm:

把进入测试模式的pycharm的pytest改为Unittests就不会进入测试模式了。
边栏推荐
- 雷达水位计的工作原理及安装维护注意事项
- Yolov7 training error indexerror: list index out of range
- MySQL 日期【加号/+】条件筛选问题
- [cloud native] use of Nacos taskmanager task management
- Leetcode-114: expand binary tree into linked list
- Struct, enum type and union
- [advanced mathematics] [1] function, limit, continuity
- Chapter VI modified specification (SPEC) class
- Unity vs -- the default debugging in VS is to start rather than attach to unity debugging
- [onnx] export pytorch model to onnx format: support multi parameter and dynamic input
猜你喜欢
![[today in history] July 4: the first e-book came out; The inventor of magnetic stripe card was born; Palm computer pioneer was born](/img/0b/73f0d98a6db813e54074abe199ed98.png)
[today in history] July 4: the first e-book came out; The inventor of magnetic stripe card was born; Palm computer pioneer was born

结构体,枚举类型与联合体
![[advanced mathematics] [5] definite integral and its application](/img/b2/62748b7533982f2b864148e0857490.png)
[advanced mathematics] [5] definite integral and its application

Opencv learning Fourier transform experience and line direction Fourier transform code

智能电子界桩自然保护区远程监控解决方案

Docker builds redis cluster
![[advanced mathematics] [8] differential equation](/img/83/b6b07540e3cf6d6433e57447d42ee9.png)
[advanced mathematics] [8] differential equation

leetcode-6130:设计数字容器系统
![[today in history] July 17: Softbank acquired arm; The first email interruption; Wikimedia International Conference](/img/0f/8ce2d5487b16d38a152cfd3ab454bb.png)
[today in history] July 17: Softbank acquired arm; The first email interruption; Wikimedia International Conference

Leetcode-919: complete binary tree inserter
随机推荐
Chinese son-in-law OTA Ono became the first Asian president of the University of Michigan, with an annual salary of more than 6.5 million!
leetcode-6125:相等行列对
[noi simulation] string matching (suffix automata Sam, Mo team, block)
[today in history] July 5: the mother of Google was born; Two Turing Award pioneers born on the same day
JS作用域与作用域链
火山引擎项亮:机器学习与智能推荐平台多云部署解决方案正式发布
Leetcode-6131: the shortest dice sequence impossible to get
leetcode-79:单词搜索
预处理指令
MySQL date [plus sign / +] condition filtering problem
Kubernetes进阶部分学习笔记
Leetcode-919: complete binary tree inserter
Based on pexels image material API, sort out the material resource library
[advanced mathematics] [8] differential equation
[paper reading] unpaired image to image translation using cycle consistent advantageous networks
[advanced drawing of single cell] 07. Display of KEGG enrichment results
Brush questions with binary tree (4)
Question and answer 47: geeks have an appointment - the current monitoring system construction of CSC
第六章 修改规范(SPEC)类
[onnx] export pytorch model to onnx format: support multi parameter and dynamic input