diff options
Diffstat (limited to 'tests/functional/s')
-rw-r--r-- | tests/functional/s/super_style.txt | 1 | ||||
-rw-r--r-- | tests/functional/s/super_with_arguments.py (renamed from tests/functional/s/super_style.py) | 7 | ||||
-rw-r--r-- | tests/functional/s/super_with_arguments.rc (renamed from tests/functional/s/super_style.rc) | 2 | ||||
-rw-r--r-- | tests/functional/s/super_with_arguments.txt | 1 |
4 files changed, 8 insertions, 3 deletions
diff --git a/tests/functional/s/super_style.txt b/tests/functional/s/super_style.txt deleted file mode 100644 index 50235699e..000000000 --- a/tests/functional/s/super_style.txt +++ /dev/null @@ -1 +0,0 @@ -old-style-super:7:Bar.__init__:Consider using Python 3 style super() without arguments diff --git a/tests/functional/s/super_style.py b/tests/functional/s/super_with_arguments.py index 342e67c4b..8ad53ee64 100644 --- a/tests/functional/s/super_style.py +++ b/tests/functional/s/super_with_arguments.py @@ -4,7 +4,7 @@ class Foo: class Bar(Foo): def __init__(self): - super(Bar, self).__init__() # [old-style-super] + super(Bar, self).__init__() # [super-with-arguments] class Baz(Foo): @@ -15,3 +15,8 @@ class Baz(Foo): class Qux(Foo): def __init__(self): super(Bar, self).__init__() + + +class NotSuperCall(Foo): + def __init__(self): + super.test(Bar, self).__init__() diff --git a/tests/functional/s/super_style.rc b/tests/functional/s/super_with_arguments.rc index cfff8dab7..0e70163ee 100644 --- a/tests/functional/s/super_style.rc +++ b/tests/functional/s/super_with_arguments.rc @@ -1,3 +1,3 @@ [Messages Control] disable=all -enable=old-style-super +enable=super-with-arguments diff --git a/tests/functional/s/super_with_arguments.txt b/tests/functional/s/super_with_arguments.txt new file mode 100644 index 000000000..e96cf89b3 --- /dev/null +++ b/tests/functional/s/super_with_arguments.txt @@ -0,0 +1 @@ +super-with-arguments:7:Bar.__init__:Consider using Python 3 style super() without arguments |