summaryrefslogtreecommitdiff
path: root/pylint/test/functional/singledispatch_functions_py3.py
diff options
context:
space:
mode:
authorAshley Whetter <ashley@awhetter.co.uk>2019-06-14 22:28:42 -0700
committerClaudiu Popa <pcmanticore@gmail.com>2019-06-20 10:02:14 +0200
commit33b8185a455c1686d038258697bb93005f2441c2 (patch)
tree4a50ccac775c009436e45803129e428ed694065f /pylint/test/functional/singledispatch_functions_py3.py
parent7081d91f30728653000bdfc59ea85a3395f96418 (diff)
downloadpylint-git-33b8185a455c1686d038258697bb93005f2441c2.tar.gz
Stopped installing tests with package
Diffstat (limited to 'pylint/test/functional/singledispatch_functions_py3.py')
-rw-r--r--pylint/test/functional/singledispatch_functions_py3.py76
1 files changed, 0 insertions, 76 deletions
diff --git a/pylint/test/functional/singledispatch_functions_py3.py b/pylint/test/functional/singledispatch_functions_py3.py
deleted file mode 100644
index cfd4d873c..000000000
--- a/pylint/test/functional/singledispatch_functions_py3.py
+++ /dev/null
@@ -1,76 +0,0 @@
-# pylint: disable=missing-docstring,import-error,unused-import,assignment-from-no-return
-# pylint: disable=invalid-name, too-few-public-methods, useless-object-inheritance
-from __future__ import print_function
-from UNINFERABLE import uninferable_func
-
-try:
- from functools import singledispatch
-except ImportError:
- from singledispatch import singledispatch
-
-my_single_dispatch = singledispatch
-
-
-class FakeSingleDispatch(object):
-
- @staticmethod
- def register(function):
- return function
-
- def __call__(self, function):
- return function
-
-fake_singledispatch_decorator = FakeSingleDispatch()
-
-@singledispatch
-def func(arg):
- return arg
-
-
-@func.register(str)
-def _(arg):
- return 42
-
-
-@func.register(float)
-@func.register(int)
-def _(arg):
- return 42
-
-
-@my_single_dispatch
-def func2(arg):
- return arg
-
-
-@func2.register(int)
-def _(arg):
- return 42
-
-
-@singledispatch
-def with_extra_arg(arg, verbose=False):
- if verbose:
- print(arg)
- return arg
-
-
-@with_extra_arg.register(str)
-def _(arg, verbose=False):
- unused = 42 # [unused-variable]
- return arg[::-1]
-
-
-@fake_singledispatch_decorator
-def not_single_dispatch(arg): # [unused-argument]
- return 'not yet implemented'
-
-
-@fake_singledispatch_decorator.register(str)
-def bad_single_dispatch(arg): # [unused-argument]
- return 42
-
-
-@fake_singledispatch_decorator.register(str)
-def bad_single_dispatch(arg): # [unused-argument, function-redefined]
- return 24