Skip to content

Commit f47e156

Browse files
committed
Remove unit tests covered by functional tests
Signed-off-by: Mike Fiedler <[email protected]>
1 parent bd9695f commit f47e156

File tree

1 file changed

+1
-37
lines changed

1 file changed

+1
-37
lines changed

tests/checkers/unittest_design.py

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import astroid
1111

1212
from pylint.checkers import design_analysis
13-
from pylint.testutils import CheckerTestCase, MessageTest, set_config
13+
from pylint.testutils import CheckerTestCase, set_config
1414
from pylint.utils.utils import get_global_option
1515

1616

@@ -44,42 +44,6 @@ class Eeee(Dddd):
4444
with self.assertNoMessages():
4545
self.checker.visit_classdef(node)
4646

47-
def test_too_few_public_methods(self) -> None:
48-
"""Tests the default ``min-public-methods`` config value of 2
49-
triggers too-few-public-methods"""
50-
node = astroid.extract_node(
51-
"""
52-
class SomeModel:
53-
def dummy(self):
54-
pass
55-
"""
56-
)
57-
message = MessageTest(
58-
"too-few-public-methods",
59-
node=node,
60-
args=(1, 2),
61-
)
62-
with self.assertAddsMessages(message):
63-
self.checker.leave_classdef(node)
64-
65-
@set_config(exclude_too_few_public_methods=("toml.*"))
66-
@set_config(min_public_methods=20) # to combat inherited methods
67-
def test_exclude_too_few_methods(self) -> None:
68-
"""Tests config setting ``exclude-too-few-public-methods`` with a
69-
comma-separated regular expression suppresses the message for
70-
`too-few-public-methods` on classes that match the regular expression.
71-
"""
72-
node = astroid.extract_node(
73-
"""
74-
from toml import TomlEncoder
75-
76-
class MyTomlEncoder(TomlEncoder):
77-
...
78-
"""
79-
)
80-
with self.assertNoMessages():
81-
self.checker.leave_classdef(node)
82-
8347
@set_config(exclude_too_few_public_methods="toml.*")
8448
def test_exclude_too_few_methods_with_value(self) -> None:
8549
"""Test exclude-too-few-public-methods option with value"""

0 commit comments

Comments
 (0)