cekong

导航

AttributeError: type object 'testClass' has no attribute 'testMothod'

点击"Unittest for test_post_API.testClass"按钮,点击”Edit configuration...“,弹出对话框Run/Debug configurations.

点左侧绿色“+”,选择python tests,选择unittests。

右侧选择configuration标签,Target选择Python,输入“py文件名.文件中定义的类名”例如test_post_API.testClass.

 

据本人以为,提示“AttributeError: type object 'testClass' has no attribute 'testMothod'”错误,可能是由于配置错误(如:test_post_API.testClass.testMothod)导致。

 

posted on 2018-11-29 15:17  cekong  阅读(1037)  评论(0编辑  收藏  举报