什么是正确使用nose.tools并使pylint开心的正确方法?如下代码:'''This is a test'''import nose.toolsimport nose.tools.trivialnose.tools.assert_equal(1, 1)nose.tools.assert_equals(1, 1)nose.tools.trivial.assert_equal(1, 1)nose.tools.trivial.assert_equals(1, 1)导致以下pylint错误:$ pylint -i y -r n /tmp/aseq.py************* Module aseqE1101: 8,0: Module 'nose.tools' has no 'assert_equal' memberE1101: 9,0: Module 'nose.tools' has no 'assert_equals' memberE1101: 11,0: Module 'nose.tools.trivial' has no 'assert_equal' memberE1101: 12,0: Module 'nose.tools.trivial' has no 'assert_equals' member当然,可以禁用E1101,有没有更清洁的方法?
添加回答
举报
0/150
提交
取消