diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2019-07-22 22:04:01 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2019-09-10 11:20:16 +0200 |
commit | 9c3ad2cfa0c30bd7dbcb66e9114986968bd73802 (patch) | |
tree | a8de2bb0f9c70f07a51f6a3574b56f3b829fe05a | |
parent | 71c8ed1a024359ac006e2b290dc06b232135c2b3 (diff) | |
download | pylint-git-9c3ad2cfa0c30bd7dbcb66e9114986968bd73802.tar.gz |
[functional tests] Modify expected result after moving files
-rw-r--r-- | .pre-commit-config.yaml | 2 | ||||
-rw-r--r-- | tests/functional/a/arguments.rc | 2 | ||||
-rw-r--r-- | tests/functional/c/ctor_arguments.py | 2 | ||||
-rw-r--r-- | tests/functional/i/import_error.py | 2 | ||||
-rw-r--r-- | tests/functional/i/import_error.txt | 2 | ||||
-rw-r--r-- | tests/functional/m/method_hidden.txt | 2 | ||||
-rw-r--r-- | tests/functional/n/no_name_in_module.txt | 4 | ||||
-rw-r--r-- | tests/functional/u/unbalanced_tuple_unpacking.py | 2 | ||||
-rw-r--r-- | tests/functional/u/unbalanced_tuple_unpacking.txt | 4 | ||||
-rw-r--r-- | tests/functional/u/unpacking_non_sequence.py | 2 | ||||
-rw-r--r-- | tests/functional/u/unpacking_non_sequence.txt | 4 | ||||
-rw-r--r-- | tests/test_functional.py | 3 | ||||
-rw-r--r-- | tests/test_self.py | 13 |
13 files changed, 23 insertions, 21 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f39425ad4..887f50cde 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: hooks: - id: black args: [--safe, --quiet] - exclude: tests/functional|tests/input|tests/extensions/data|tests/regrtest_data/|tests/data/ + exclude: tests/functional/|tests/input|tests/extensions/data|tests/regrtest_data/|tests/data/ - repo: https://github.com/pre-commit/pre-commit-hooks rev: v2.1.0 hooks: diff --git a/tests/functional/a/arguments.rc b/tests/functional/a/arguments.rc index bb6bf0e37..2b7745370 100644 --- a/tests/functional/a/arguments.rc +++ b/tests/functional/a/arguments.rc @@ -1,2 +1,2 @@ [TYPECHECK] -signature-mutators=functional.arguments.mutation_decorator +signature-mutators=functional.a.arguments.mutation_decorator diff --git a/tests/functional/c/ctor_arguments.py b/tests/functional/c/ctor_arguments.py index d9a9944a6..12bf8690a 100644 --- a/tests/functional/c/ctor_arguments.py +++ b/tests/functional/c/ctor_arguments.py @@ -1,6 +1,6 @@ """Test function argument checker on __init__ -Based on test/functional/arguments.py +Based on tests/functional/a/arguments.py """ # pylint: disable=C0111,R0903,W0231, useless-object-inheritance diff --git a/tests/functional/i/import_error.py b/tests/functional/i/import_error.py index 69fd15be1..750d1eec9 100644 --- a/tests/functional/i/import_error.py +++ b/tests/functional/i/import_error.py @@ -26,4 +26,4 @@ except ImportError: from .collections import missing # [import-error] -from .syntax_error import toto # [syntax-error] +from ..s.syntax_error import toto # [syntax-error] diff --git a/tests/functional/i/import_error.txt b/tests/functional/i/import_error.txt index 493e79a01..3d4f3482d 100644 --- a/tests/functional/i/import_error.txt +++ b/tests/functional/i/import_error.txt @@ -1,4 +1,4 @@ import-error:3::"Unable to import 'totally_missing'" import-error:16::"Unable to import 'maybe_missing_2'" -import-error:27::"Unable to import 'functional.collections'" +import-error:27::"Unable to import 'functional.c.collections'" syntax-error:29::"Cannot import 'syntax_error' due to syntax error 'invalid syntax (<unknown>, line 1)'" diff --git a/tests/functional/m/method_hidden.txt b/tests/functional/m/method_hidden.txt index 7dfb8d3e0..227197112 100644 --- a/tests/functional/m/method_hidden.txt +++ b/tests/functional/m/method_hidden.txt @@ -1 +1 @@ -method-hidden:13:Cdef.abcd:An attribute defined in functional.method_hidden line 9 hides this method +method-hidden:13:Cdef.abcd:An attribute defined in functional.m.method_hidden line 9 hides this method diff --git a/tests/functional/n/no_name_in_module.txt b/tests/functional/n/no_name_in_module.txt index 7dbc11c6c..611746f90 100644 --- a/tests/functional/n/no_name_in_module.txt +++ b/tests/functional/n/no_name_in_module.txt @@ -10,5 +10,5 @@ no-name-in-module:34::No name 'anything' in module 'collections' no-name-in-module:44::No name 'indeed_missing' in module 'collections' no-name-in-module:49::No name 'emit' in module 'collections' no-name-in-module:60::No name 'emit2' in module 'collections' -no-name-in-module:65::No name 'lala' in module 'functional.no_self_use' -no-name-in-module:66::No name 'bla' in module 'functional.no_self_use' +no-name-in-module:65::No name 'lala' in module 'functional.n.no_self_use' +no-name-in-module:66::No name 'bla' in module 'functional.n.no_self_use' diff --git a/tests/functional/u/unbalanced_tuple_unpacking.py b/tests/functional/u/unbalanced_tuple_unpacking.py index afa217f40..d3887f4f3 100644 --- a/tests/functional/u/unbalanced_tuple_unpacking.py +++ b/tests/functional/u/unbalanced_tuple_unpacking.py @@ -1,6 +1,6 @@ """Check possible unbalanced tuple unpacking """ from __future__ import absolute_import -from functional.unpacking import unpack +from functional.u.unpacking import unpack # pylint: disable=using-constant-test, useless-object-inheritance diff --git a/tests/functional/u/unbalanced_tuple_unpacking.txt b/tests/functional/u/unbalanced_tuple_unpacking.txt index e904209e5..af6a26602 100644 --- a/tests/functional/u/unbalanced_tuple_unpacking.txt +++ b/tests/functional/u/unbalanced_tuple_unpacking.txt @@ -2,5 +2,5 @@ unbalanced-tuple-unpacking:9:do_stuff:"Possible unbalanced tuple unpacking with unbalanced-tuple-unpacking:14:do_stuff1:"Possible unbalanced tuple unpacking with sequence [1, 2, 3]: left side has 2 label(s), right side has 3 value(s)" unbalanced-tuple-unpacking:19:do_stuff2:"Possible unbalanced tuple unpacking with sequence (1, 2, 3): left side has 2 label(s), right side has 3 value(s)" unbalanced-tuple-unpacking:24:do_stuff3:"Possible unbalanced tuple unpacking with sequence (1, 2, 3): left side has 2 label(s), right side has 3 value(s)" -unbalanced-tuple-unpacking:69:do_stuff9:"Possible unbalanced tuple unpacking with sequence defined at line 7 of functional.unpacking: left side has 2 label(s), right side has 3 value(s)" -unbalanced-tuple-unpacking:81:UnbalancedUnpacking.test:"Possible unbalanced tuple unpacking with sequence defined at line 7 of functional.unpacking: left side has 2 label(s), right side has 3 value(s)" +unbalanced-tuple-unpacking:69:do_stuff9:"Possible unbalanced tuple unpacking with sequence defined at line 7 of functional.u.unpacking: left side has 2 label(s), right side has 3 value(s)" +unbalanced-tuple-unpacking:81:UnbalancedUnpacking.test:"Possible unbalanced tuple unpacking with sequence defined at line 7 of functional.u.unpacking: left side has 2 label(s), right side has 3 value(s)" diff --git a/tests/functional/u/unpacking_non_sequence.py b/tests/functional/u/unpacking_non_sequence.py index 06a840b58..38eca384c 100644 --- a/tests/functional/u/unpacking_non_sequence.py +++ b/tests/functional/u/unpacking_non_sequence.py @@ -4,7 +4,7 @@ # pylint: disable=using-constant-test, no-init, missing-docstring, wrong-import-order,wrong-import-position,no-else-return, useless-object-inheritance from os import rename as nonseq_func from six import with_metaclass -from functional.unpacking import nonseq +from functional.u.unpacking import nonseq __revision__ = 0 diff --git a/tests/functional/u/unpacking_non_sequence.txt b/tests/functional/u/unpacking_non_sequence.txt index 0a21fab42..36f142151 100644 --- a/tests/functional/u/unpacking_non_sequence.txt +++ b/tests/functional/u/unpacking_non_sequence.txt @@ -2,8 +2,8 @@ unpacking-non-sequence:78::Attempting to unpack a non-sequence defined at line 7 unpacking-non-sequence:79::Attempting to unpack a non-sequence unpacking-non-sequence:80::Attempting to unpack a non-sequence None unpacking-non-sequence:81::Attempting to unpack a non-sequence 1 -unpacking-non-sequence:82::Attempting to unpack a non-sequence defined at line 9 of functional.unpacking -unpacking-non-sequence:83::Attempting to unpack a non-sequence defined at line 11 of functional.unpacking +unpacking-non-sequence:82::Attempting to unpack a non-sequence defined at line 9 of functional.u.unpacking +unpacking-non-sequence:83::Attempting to unpack a non-sequence defined at line 11 of functional.u.unpacking unpacking-non-sequence:84::Attempting to unpack a non-sequence unpacking-non-sequence:99:ClassUnpacking.test:Attempting to unpack a non-sequence defined at line 75 unpacking-non-sequence:100:ClassUnpacking.test:Attempting to unpack a non-sequence diff --git a/tests/test_functional.py b/tests/test_functional.py index b7d7be211..aa4781dc1 100644 --- a/tests/test_functional.py +++ b/tests/test_functional.py @@ -321,7 +321,8 @@ class LintModuleTest(object): return received_msgs, received_output_lines def _runTest(self): - self._linter.check([self._test_file.module]) + modules_to_check = [self._test_file.source] + self._linter.check(modules_to_check) expected_messages, expected_text = self._get_expected() received_messages, received_text = self._get_received() diff --git a/tests/test_self.py b/tests/test_self.py index bcde2e5b1..3f029e131 100644 --- a/tests/test_self.py +++ b/tests/test_self.py @@ -146,7 +146,7 @@ class TestRunTC(object): JSONReporter(StringIO()), ] self._runtest( - [join(HERE, "functional/arguments.py")], + [join(HERE, "functional", "a", "arguments.py")], reporter=MultiReporter(reporters), code=2, ) @@ -226,7 +226,7 @@ class TestRunTC(object): strio = StringIO() assert strio.encoding is None self._runtest( - [join(HERE, "regrtest_data/no_stdout_encoding.py"), "--enable=all"], + [join(HERE, "regrtest_data", "no_stdout_encoding.py"), "--enable=all"], out=strio, code=28, ) @@ -235,8 +235,8 @@ class TestRunTC(object): self._runtest( [ "-j 2", - join(HERE, "functional/arguments.py"), - join(HERE, "functional/arguments.py"), + join(HERE, "functional", "a", "arguments.py"), + join(HERE, "functional", "a", "arguments.py"), ], code=2, ) @@ -248,13 +248,14 @@ class TestRunTC(object): # Test that --py3k flag works. rc_code = 0 self._runtest( - [join(HERE, "functional", "unpacked_exceptions.py"), "--py3k"], code=rc_code + [join(HERE, "functional", "u", "unpacked_exceptions.py"), "--py3k"], + code=rc_code, ) def test_py3k_jobs_option(self): rc_code = 0 self._runtest( - [join(HERE, "functional", "unpacked_exceptions.py"), "--py3k", "-j 2"], + [join(HERE, "functional", "u", "unpacked_exceptions.py"), "--py3k", "-j 2"], code=rc_code, ) |