summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2023-04-22 22:23:00 +0200
committerGitHub <noreply@github.com>2023-04-22 22:23:00 +0200
commitbf7d42e494d8c4ad3526bd7983067a05e9a8a248 (patch)
tree6cdf54690a7626a23c980cdc1a22d9e5cd3dba74 /tests
parentd4529f5617e1b952c3fc167dd714efb090d72081 (diff)
downloadastroid-git-bf7d42e494d8c4ad3526bd7983067a05e9a8a248.tar.gz
Fix constructors of ``Module`` (#2133)
Diffstat (limited to 'tests')
-rw-r--r--tests/test_nodes_lineno.py2
-rw-r--r--tests/test_scoped_nodes.py23
2 files changed, 1 insertions, 24 deletions
diff --git a/tests/test_nodes_lineno.py b/tests/test_nodes_lineno.py
index 962fe483..bbc1a300 100644
--- a/tests/test_nodes_lineno.py
+++ b/tests/test_nodes_lineno.py
@@ -1241,6 +1241,6 @@ class TestLinenoColOffset:
module = astroid.parse(code)
assert isinstance(module, nodes.Module)
assert module.lineno == 0
- assert module.col_offset is None
+ assert module.col_offset == 0
assert module.end_lineno is None
assert module.end_col_offset is None
diff --git a/tests/test_scoped_nodes.py b/tests/test_scoped_nodes.py
index 3e8256dd..0cfe411c 100644
--- a/tests/test_scoped_nodes.py
+++ b/tests/test_scoped_nodes.py
@@ -2947,26 +2947,3 @@ def test_deprecation_of_doc_attribute() -> None:
with pytest.warns(DeprecationWarning) as records:
assert node_func.doc == "Docstring"
assert len(records) == 1
-
- # If 'doc' is passed to Module, ClassDef, FunctionDef,
- # a DeprecationWarning should be raised
- doc_node = nodes.Const("Docstring")
- with pytest.warns(DeprecationWarning) as records:
- node_module = nodes.Module(name="MyModule", doc="Docstring")
- node_class = nodes.ClassDef(
- name="MyClass",
- lineno=0,
- col_offset=0,
- end_lineno=0,
- end_col_offset=0,
- parent=nodes.Unknown(),
- )
- node_func = nodes.FunctionDef(
- name="MyFunction",
- lineno=0,
- col_offset=0,
- parent=node_module,
- end_lineno=0,
- end_col_offset=0,
- )
- assert len(records) == 1