Skip to content

Commit 453ae20

Browse files
[refactor] Move 'dataclass' functional tests to their own directory
1 parent 753ce5d commit 453ae20

15 files changed

+18
-12
lines changed

tests/functional/d/dataclass_typecheck.py renamed to tests/functional/d/dataclass/dataclass_typecheck.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
33
Tests for regressions from https://github.com/PyCQA/astroid/pull/1126
44
"""
5+
56
# pylint: disable=missing-docstring,too-few-public-methods,pointless-statement,redefined-builtin, fixme
7+
8+
# Disabled because of a bug with pypy 3.8 see
9+
# https://github.com/PyCQA/pylint/pull/7918#issuecomment-1352737369
10+
# pylint: disable=multiple-statements
11+
612
from dataclasses import dataclass
713
from typing import Callable, Dict, List, Optional
814

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
invalid-sequence-index:38:6:38:20::Sequence index is not an int, slice, or instance with __index__:UNDEFINED
2+
invalid-slice-index:42:10:42:19::Slice index is not an int, None, or instance with __index__:UNDEFINED
3+
not-callable:45:0:45:14::obj.attr1 is not callable:UNDEFINED
4+
invalid-unary-operand-type:50:6:50:16::"bad operand type for unary -: str":UNDEFINED
5+
unsupported-membership-test:57:11:57:20::Value 'obj.attr1' doesn't support membership test:UNDEFINED
6+
unsubscriptable-object:62:6:62:15::Value 'obj.attr1' is unsubscriptable:UNDEFINED
7+
unsupported-assignment-operation:67:0:67:9::'obj.attr1' does not support item assignment:UNDEFINED
8+
unsupported-delete-operation:72:4:72:13::'obj.attr1' does not support item deletion:UNDEFINED
9+
not-context-manager:97:0:98:8::Context manager 'str' doesn't implement __enter__ and __exit__.:UNDEFINED
10+
invalid-metaclass:105:0:105:11:Test2:Invalid metaclass 'Instance of builtins.int' used:UNDEFINED
11+
unhashable-member:111:0:111:2::'obj.attr5' is unhashable and can't be used as a key in a dict:INFERENCE
12+
isinstance-second-argument-not-valid-type:121:6:121:30::Second argument of isinstance is not a type:UNDEFINED

0 commit comments

Comments
 (0)