diff options
author | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-07-02 17:09:34 +0300 |
---|---|---|
committer | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-07-02 17:09:34 +0300 |
commit | 54e4b98eae6108e59dbbc754b5ed80dacc23bfe4 (patch) | |
tree | 818488a7e40a78c38feedd03631f53ca8c4f5b67 | |
parent | 10b1a52534f5d39a9894b552ab345f4ce0c195b9 (diff) | |
download | pylint-54e4b98eae6108e59dbbc754b5ed80dacc23bfe4.tar.gz |
Remove a couple of faulty tests
logilab.common 1.0+ is now a namespace package, which has the side
effect that it is considered builtin, which makes the no-member
check to not emit a message in certain situations.
-rw-r--r-- | pylint/test/functional/no_name_in_module.py | 6 | ||||
-rw-r--r-- | pylint/test/functional/no_name_in_module.txt | 6 | ||||
-rw-r--r-- | pylint/test/unittest_lint.py | 10 |
3 files changed, 6 insertions, 16 deletions
diff --git a/pylint/test/functional/no_name_in_module.py b/pylint/test/functional/no_name_in_module.py index a81c108..a59327b 100644 --- a/pylint/test/functional/no_name_in_module.py +++ b/pylint/test/functional/no_name_in_module.py @@ -2,14 +2,14 @@ """check unexistant names imported are reported""" from __future__ import print_function -import logilab.common.tutu # [no-name-in-module] -from logilab.common import toto # [no-name-in-module] +import collections.tutu # [no-name-in-module] +from collections import toto # [no-name-in-module] toto.yo() from logilab.common import modutils modutils.nonexistant_function() # [no-member] modutils.another.nonexistant.function() # [no-member] -print(logilab.common.modutils.yo) # [no-member] +print(collections.yo) # [no-member] import sys print(sys.stdout, 'hello world') diff --git a/pylint/test/functional/no_name_in_module.txt b/pylint/test/functional/no_name_in_module.txt index 8ac2c9b..dd78c1b 100644 --- a/pylint/test/functional/no_name_in_module.txt +++ b/pylint/test/functional/no_name_in_module.txt @@ -1,8 +1,8 @@ -no-name-in-module:5::No name 'tutu' in module 'logilab.common' -no-name-in-module:6::No name 'toto' in module 'logilab.common' +no-name-in-module:5::No name 'tutu' in module 'collections' +no-name-in-module:6::No name 'toto' in module 'collections' no-member:10::Module 'logilab.common.modutils' has no 'nonexistant_function' member:INFERENCE no-member:11::Module 'logilab.common.modutils' has no 'another' member:INFERENCE -no-member:12::Module 'logilab.common.modutils' has no 'yo' member:INFERENCE +no-member:12::Module 'collections' has no 'yo' member:INFERENCE no-member:16::Module 'sys' has no 'stdoout' member:INFERENCE no-name-in-module:23::No name 'compiile' in module 're' no-name-in-module:23::No name 'findiiter' in module 're' diff --git a/pylint/test/unittest_lint.py b/pylint/test/unittest_lint.py index e2f5381..98fc225 100644 --- a/pylint/test/unittest_lint.py +++ b/pylint/test/unittest_lint.py @@ -370,16 +370,6 @@ class PyLinterTC(unittest.TestCase): for f in files: self.assertTrue(os.path.exists(f)) - def test_lint_should_analyze_file(self): - self.linter.set_reporter(text.TextReporter()) - self.linter.config.files_output = True - self.linter.should_analyze_file = lambda *args: False - self.addCleanup(remove, 'pylint_logilab.txt') - - self.linter.check('logilab') - self.assertTrue(os.path.exists('pylint_logilab.txt')) - self.assertFalse(os.path.exists('pylint_logilab_common.txt')) - def test_enable_report(self): self.assertEqual(self.linter.report_is_enabled('RP0001'), True) self.linter.disable('RP0001') |