python debug :退出 python tests in XX.py 模式

本文讲述了在Pycharm中遇到右键运行Python程序进入Pytest模式的问题,并提供了解决方案:在File>Settings>Tools>PythonintegratedTools中将Defaulttestrunner设置为Unittests。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、在Pycharm中右键运行python程序时出现Run 'pytest in *****.py' ,这是进入了Pytest模式。

2、解决办法

进入到File->Settings->Tools->Python integrated Tools页面

找到Testing下的Default test runner

把Pytest设置为Unittests就可以了

 

03-31 16:57:03.101 DEBUG gyro time: 33.59s, num_pts: 3356, effective sampling rate: 99.92 Hz 03-31 16:57:03.165 DEBUG Integrated gyro drift min/max (degrees) x: -0.005/5.455, y: -0.040/0.259, z: -0.206/0.027 03-31 16:57:03.216 DEBUG rv time: 33.59s, num_pts: 3356, effective sampling rate: 99.92 Hz 03-31 16:57:03.266 DEBUG RV drift (degrees) x: -0.220/0.649, y: -0.084/0.054, z: -0.229/0.037 03-31 16:57:03.315 DEBUG X gyro_mean: 1.273e-01 03-31 16:57:03.315 DEBUG X gyro_var: 1.946e+00 03-31 16:57:03.315 ERROR Exception occurred in test_imu_drift. Traceback (most recent call last): File "/home/realme/.local/lib/python3.10/site-packages/mobly/base_test.py", line 783, in exec_one_test test_method() File "/home/realme/its/sprd/android-cts-verifier/CameraITS/tests/scene3/test_imu_drift.py", line 286, in test_imu_drift raise AssertionError(f'gyro_var: {gyro_var:.3e}, ' AssertionError: gyro_var: 1.946e+00, ATOL=3.280e-02这个是fail 03-31 16:53:35.549 DEBUG gyro time: 33.70s, num_pts: 3367, effective sampling rate: 99.90 Hz 03-31 16:53:35.623 DEBUG Integrated gyro drift min/max (degrees) x: -0.158/0.022, y: -0.009/0.206, z: -0.089/0.024 03-31 16:53:35.670 DEBUG rv time: 33.70s, num_pts: 3367, effective sampling rate: 99.90 Hz 03-31 16:53:35.720 DEBUG RV drift (degrees) x: -0.018/2.724, y: -0.043/0.182, z: -0.040/0.440 03-31 16:53:35.770 DEBUG X gyro_mean: -4.560e-03 03-31 16:53:35.770 DEBUG X gyro_var: 2.724e-02 03-31 16:53:35.770 DEBUG Y gyro_mean: 2.845e-03 03-31 16:53:35.770 DEBUG Y gyro_var: 2.684e-02 03-31 16:53:35.771 DEBUG Z gyro_mean: -1.867e-03 03-31 16:53:35.771 DEBUG Z gyro_var: 2.711e-02 03-31 16:53:35.771 DEBUG Check for advanced features gyro drift. 03-31 16:53:35.771 DEBUG [test_imu_drift]#teardown_test >>> BEGIN >>> 03-31 16:53:35.771 DEBUG [test_imu_drift]#teardown_test <<< END <<< 03-31 16:53:35.771 DEBUG [test_imu_drift]#on_pass >>> BEGIN >>> 03-31 16:53:35.771 DEBUG test_imu_drift on PASS.这个pass,这两个有什么区别
04-04
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值