2024-09-30 12:12:10 发布
网友
我有一个python类,我的class.py包含2个类。在
class MyTestClass1: def test1(self): print "Test 1" class MyTestClass2: def test1(self): print "Test 1"
我想在robot框架中实现这两个类 如何实施?在
我试过这样的方法:
错误:导入测试库'我的班。我的班1'失败:ImportError:没有名为myclass的模块
我只试过用你的密码
Python文件我的class.py
机器人文件
快跑
输出
============================================================================== Myclassf ============================================================================== Test Case 1 | PASS | Myclassf | PASS | 1 critical test, 1 passed, 0 failed 1 test total, 1 passed, 0 failed ==============================================================================
执行过程中可能出现的问题
1)robot文件和Python文件可能不在同一个文件夹中(这不是必需的,但是如果两个文件位于不同的位置,则必须指定路径
2)在库中给出文件名/类名时,需要考虑大小写
我只试过用你的密码
Python文件我的class.py
机器人文件
^{pr2}$快跑
输出
执行过程中可能出现的问题
1)robot文件和Python文件可能不在同一个文件夹中(这不是必需的,但是如果两个文件位于不同的位置,则必须指定路径
2)在库中给出文件名/类名时,需要考虑大小写
相关问题 更多 >
编程相关推荐