File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -166,8 +166,8 @@ def pytest_configure(config):
166
166
config .addinivalue_line ('markers' , "pylint: Tests which run pylint." )
167
167
168
168
169
- # pylint: disable=too-few-public-methods
170
- class PylintPlugin :
169
+ # pylint: disable=too-few-public-methods, useless-object-inheritance
170
+ class PylintPlugin ( object ) :
171
171
"""
172
172
A Plugin object for pylint, which loads and records file mtimes.
173
173
"""
Original file line number Diff line number Diff line change @@ -223,20 +223,18 @@ def test_skip_checked_files(testdir):
223
223
Test a file twice which can pass pylint.
224
224
The 2nd time should be skipped.
225
225
"""
226
- testdir .makepyfile ('''#!/usr/bin/env python
227
- """A hello world script."""
228
-
229
- from __future__ import print_function
230
-
231
- print('Hello world!')
232
- # pylint: disable=missing-final-newline
233
- ''' )
226
+ testdir .makepyfile (
227
+ '#!/usr/bin/env python' ,
228
+ '"""A hello world script."""' ,
229
+ '' ,
230
+ 'from __future__ import print_function' ,
231
+ '' ,
232
+ 'print("Hello world!") # pylint: disable=missing-final-newline' ,
233
+ )
234
234
# The 1st time should be passed
235
235
result = testdir .runpytest ('--pylint' )
236
- print (result .stdout .str ())
237
236
assert '1 passed' in result .stdout .str ()
238
237
239
238
# The 2nd time should be skipped
240
239
result = testdir .runpytest ('--pylint' )
241
- print (result .stdout .str ())
242
240
assert '1 skipped' in result .stdout .str ()
You can’t perform that action at this time.
0 commit comments