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)导致。
AttributeError: type object 'testClass' has no attribute 'testMothod'的更多相关文章
- ddt运行测试方法时报错AttributeError: type object 'TestHttpRq' has no attribute 'test_http_rq_login'
import unittest import ddt #装饰器 from ddt import ddt,data,unpack #导入ddt中的各个模块 from homework.unittest_ ...
- AttributeError type object 'deprecated' has no attribute 'ROCKY'
AttributeError type object 'deprecated' has no attribute 'ROCKY' 在使用kolla安装docker的时候遇到了AttributeErro ...
- ddt运行报错AttributeError: type object 'TestLogin' has no attribute 'test_login'
源代码: #!usr/bin/python3 # -*- coding:utf-8 -*- # @Time: 2018/12/17 下午2:07 # @File: do_excel.py # @Sof ...
- Rasa init报错:AttributeError: type object 'Callable' has no attribute '_abc_registry'
错误:Rasa init --no-prompt 报错 原因:Python升级到3.7后会遇到该问题 解决:pip uninstall typing
- AttributeError: type object '_io.StringIO' has no attribute 'StringIO'
python2导入StringIO模块,直接: from StringIO import StringIO 对于python3,StringIO和cStringIO模块已经没了,如果要使用的话,需要导 ...
- 重写用户模型时报错AttributeError: type object ‘自定义类’ has no attribute ‘USERNAME_FIELD’
view中导入:from django.contrib.auth.models import AbstractBaseUser settings.py中设置了:AUTH_USER_MODEL='app ...
- Python - celery 相关报错 - AttributeError: type object '_multiprocessing.win32' has no attribute 'WAIT_OBJECT_0'
报错场景 执行 celery worker -A tasks -l INFO 打开 worker 的时候报错无法进行 报错解决 Celery 的版本过高, 进行降级处理即可 pip instal ...
- AttributeError: 'WebElement' object has no attribute 'send_keys'
这个是没问题的代码:用来打开谷歌搜索cheese并退出 from selenium import webdriver from selenium.common.exceptions import Ti ...
- 解决:pipenv shell报错:AttributeError: 'module' object has no attribute 'run'
利用pipenv shell切换到虚拟环境时,显示报错:AttributeError: 'module' object has no attribute 'run' 可以看到是d:\program\p ...
随机推荐
- 100-days: Seven
Title: Can baiju, China's sorghum firewater, go global? sorghum n. 高粱 firewater n. 烈酒 Baijiu——a broa ...
- POJ 1177 Picture(线段树周长并)
描述 A number of rectangular posters, photographs and other pictures of the same shape are pasted on ...
- Python: 爬取百度贴吧图片
练习之代码片段,以做备忘: # encoding=utf8 from __future__ import unicode_literals import urllib, urllib2 import ...
- python----二叉树实现及相关操作
一.二叉树子节点个数 #初始化叶子节点和根结点 class treeNode(): def __init__(self,data=-1,left=None,right=None): self.data ...
- jsp页面\n换行替换
1,js替换 var text= $(this).text(); var reg = new RegExp("\\n","g");//g,表示全部替换. tex ...
- swift语言版本选择 - 解决XCode报错:The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported valu
转发链接:https://blog.csdn.net/nathan1987_/article/details/79757368 The “Swift Language Version” (SWIFT_ ...
- Django创建模型,迁移数据
1.在models.py文件中添加代码 class notice(models.Model): notice_title = models.CharField(max_length=255) noti ...
- 关于map::erase的使用说明
C++ 中经常使用的容器类有vector,list,map.其中vector和list的erase都是返回迭代器,但是map就比较不一样. 当在循环体中使用map::erase语句时,为了能够在任何机 ...
- html5的地理位置定位
html5提供的地理位置定位使开发人员不用借助其他软件就能轻松实现位置查找,地图应用,导航等功能. 地理位置定位基本原理GPS, WIFI, IP, 手机信号基站 核心对象Geolocation是wi ...
- 9.4-9.19 h5日记总结
总结: 1.标签 (1)单.双标签 (2)块级.行级标签 (3)标签的属性 2.CSS (1)选择器 *.id.class.标签.后代.子代.并集.交集.伪类.结构 (2)层叠性,即选择器权重的计算 ...