diff options
| author | doranid <ddandd@gmail.com> | 2021-08-01 22:04:46 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-01 21:04:46 +0200 |
| commit | e17862654fc0585e63f5ab6785eab23787e91e9b (patch) | |
| tree | 30f37de849659b816358975fb577394fc1affc34 /tests | |
| parent | f236e36729265602143ace2d969b44e53e4d57c1 (diff) | |
| download | astroid-git-e17862654fc0585e63f5ab6785eab23787e91e9b.tar.gz | |
Don't calculate slots when MRO parsing fails. (#1089)
* Don't calculate slots when MRO parsing fails.
* Added changelog entry.
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/unittest_scoped_nodes.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/unittest_scoped_nodes.py b/tests/unittest_scoped_nodes.py index 8fd890d1..56e1ed29 100644 --- a/tests/unittest_scoped_nodes.py +++ b/tests/unittest_scoped_nodes.py @@ -2230,5 +2230,16 @@ def test_ancestor_with_generic(): ] +def test_slots_duplicate_bases_issue_1089(): + astroid = builder.parse( + """ + class First(object, object): #@ + pass + """ + ) + with pytest.raises(NotImplementedError): + astroid["First"].slots() + + if __name__ == "__main__": unittest.main() |
