diff options
| author | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-05-16 18:25:57 +0300 |
|---|---|---|
| committer | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-05-16 18:25:57 +0300 |
| commit | f67d43227ebab39b21bb0528901934966bc6b20f (patch) | |
| tree | ef02c0697093993718d7915ed08c8b0e0dcb88b2 /pylint/testutils.py | |
| parent | 7d72dfb9add82de5b982491a64e24e94aaef5f7d (diff) | |
| download | pylint-git-f67d43227ebab39b21bb0528901934966bc6b20f.tar.gz | |
Fix some pylint warnings over pylint's codebase.
Diffstat (limited to 'pylint/testutils.py')
| -rw-r--r-- | pylint/testutils.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pylint/testutils.py b/pylint/testutils.py index 7a4bddc86..c7d8e1d2f 100644 --- a/pylint/testutils.py +++ b/pylint/testutils.py @@ -170,9 +170,9 @@ class UnittestLinter(object): def set_config(**kwargs): """Decorator for setting config values on a checker.""" - def _Wrapper(fun): + def _wrapper(fun): @functools.wraps(fun) - def _Forward(self): + def _forward(self): for key, value in six.iteritems(kwargs): setattr(self.checker.config, key, value) if isinstance(self, CheckerTestCase): @@ -180,8 +180,8 @@ def set_config(**kwargs): self.checker.open() fun(self) - return _Forward - return _Wrapper + return _forward + return _wrapper class CheckerTestCase(unittest.TestCase): @@ -391,17 +391,17 @@ def create_tempfile(content=None): # Can't use tempfile.NamedTemporaryFile here # because on Windows the file must be closed before writing to it, # see http://bugs.python.org/issue14243 - fd, tmp = tempfile.mkstemp() + file_handle, tmp = tempfile.mkstemp() if content: if sys.version_info >= (3, 0): # erff - os.write(fd, bytes(content, 'ascii')) + os.write(file_handle, bytes(content, 'ascii')) else: - os.write(fd, content) + os.write(file_handle, content) try: yield tmp finally: - os.close(fd) + os.close(file_handle) os.remove(tmp) @contextlib.contextmanager |
