summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2022-09-18 09:00:22 +0200
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2022-09-19 16:14:13 +0200
commit8d6d31bb8f9b44c6147522c49fa099c110b067f0 (patch)
tree2c013903e5d156d1021502d66d66d0bbf91f5808 /tests
parent731d0515fcbc3c95813270021ec422d3114e13d6 (diff)
downloadastroid-git-8d6d31bb8f9b44c6147522c49fa099c110b067f0.tar.gz
[flake8] Set the max line length to 110 instead of 138
Co-authored-by: Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/unittest_brain.py6
-rw-r--r--tests/unittest_brain_ctypes.py8
-rw-r--r--tests/unittest_modutils.py2
-rw-r--r--tests/unittest_nodes_lineno.py7
4 files changed, 13 insertions, 10 deletions
diff --git a/tests/unittest_brain.py b/tests/unittest_brain.py
index 07d17c4c..2f88fc54 100644
--- a/tests/unittest_brain.py
+++ b/tests/unittest_brain.py
@@ -1473,7 +1473,8 @@ class CollectionsBrain(unittest.TestCase):
@test_utils.require_version(minver="3.9")
def test_collections_object_subscriptable_3(self):
- """With python39 ByteString class of the colletions module is subscritable (but not the same class from typing module)"""
+ """With Python 3.9 the ByteString class of the collections module is subscritable
+ (but not the same class from typing module)"""
right_node = builder.extract_node(
"""
import collections.abc
@@ -1984,7 +1985,8 @@ class TypingBrain(unittest.TestCase):
)
def test_typing_object_notsubscriptable_3(self):
- """Until python39 ByteString class of the typing module is not subscritable (whereas it is in the collections module)"""
+ """Until python39 ByteString class of the typing module is not
+ subscriptable (whereas it is in the collections' module)"""
right_node = builder.extract_node(
"""
import typing
diff --git a/tests/unittest_brain_ctypes.py b/tests/unittest_brain_ctypes.py
index cae95409..dbcf54d9 100644
--- a/tests/unittest_brain_ctypes.py
+++ b/tests/unittest_brain_ctypes.py
@@ -10,7 +10,8 @@ from astroid import extract_node, nodes
pytestmark = pytest.mark.skipif(
hasattr(sys, "pypy_version_info"),
- reason="pypy has its own implementation of _ctypes module which is different from the one of cpython",
+ reason="pypy has its own implementation of _ctypes module which is different "
+ "from the one of cpython",
)
@@ -83,8 +84,9 @@ def test_ctypes_redefined_types_members(c_type, builtin_type, type_code):
def test_cdata_member_access() -> None:
"""
- Test that the base members are still accessible. Each redefined ctypes type inherits from _SimpleCData which itself
- inherits from _CData. Checks that _CData members are accessibles
+ Test that the base members are still accessible. Each redefined ctypes type
+ inherits from _SimpleCData which itself inherits from _CData. Checks that
+ _CData members are accessible.
"""
src = """
import ctypes
diff --git a/tests/unittest_modutils.py b/tests/unittest_modutils.py
index 82bb7660..6f8d8033 100644
--- a/tests/unittest_modutils.py
+++ b/tests/unittest_modutils.py
@@ -411,7 +411,6 @@ class GetModuleFilesTest(unittest.TestCase):
class ExtensionPackageWhitelistTest(unittest.TestCase):
def test_is_module_name_part_of_extension_package_whitelist_true(self) -> None:
- """Test that the is_module_name_part_of_extension_package_whitelist function returns True when needed"""
self.assertTrue(
modutils.is_module_name_part_of_extension_package_whitelist(
"numpy", {"numpy"}
@@ -429,7 +428,6 @@ class ExtensionPackageWhitelistTest(unittest.TestCase):
)
def test_is_module_name_part_of_extension_package_whitelist_success(self) -> None:
- """Test that the is_module_name_part_of_extension_package_whitelist function returns False when needed"""
self.assertFalse(
modutils.is_module_name_part_of_extension_package_whitelist(
"numpy", {"numpy.core"}
diff --git a/tests/unittest_nodes_lineno.py b/tests/unittest_nodes_lineno.py
index c1c089ac..2cc8094d 100644
--- a/tests/unittest_nodes_lineno.py
+++ b/tests/unittest_nodes_lineno.py
@@ -661,9 +661,10 @@ class TestLinenoColOffset:
assert isinstance(f1.args.kwonlyargs[0], nodes.AssignName)
assert (f1.args.kwonlyargs[0].lineno, f1.args.kwonlyargs[0].col_offset) == (4, 4)
assert (f1.args.kwonlyargs[0].end_lineno, f1.args.kwonlyargs[0].end_col_offset) == (4, 16)
- assert isinstance(f1.args.kwonlyargs_annotations[0], nodes.Name)
- assert (f1.args.kwonlyargs_annotations[0].lineno, f1.args.kwonlyargs_annotations[0].col_offset) == (4, 13)
- assert (f1.args.kwonlyargs_annotations[0].end_lineno, f1.args.kwonlyargs_annotations[0].end_col_offset) == (4, 16)
+ annotations = f1.args.kwonlyargs_annotations
+ assert isinstance(annotations[0], nodes.Name)
+ assert (annotations[0].lineno, annotations[0].col_offset) == (4, 13)
+ assert (annotations[0].end_lineno, annotations[0].end_col_offset) == (4, 16)
assert isinstance(f1.args.kw_defaults[0], nodes.Const)
assert (f1.args.kw_defaults[0].lineno, f1.args.kw_defaults[0].col_offset) == (4, 19)
assert (f1.args.kw_defaults[0].end_lineno, f1.args.kw_defaults[0].end_col_offset) == (4, 20)