Skip to content
Snippets Groups Projects
Commit 54fea8f9 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

fixed #60

Change-Id: Ibe82b23afe8577c18550fdf579d9589c4d0f6044
parent 1fbd166c
No related branches found
No related tags found
No related merge requests found
...@@ -3,4 +3,6 @@ ...@@ -3,4 +3,6 @@
* minor pylint improvements * minor pylint improvements
* better coverage * better coverage
* SyncableDroppable.cleanup() bugs out, wrote a quick patch for it to do nothing and filed as #61. * SyncableDroppable.cleanup() bugs out, wrote a quick patch for it to do nothing and filed as #61.
* unit tests for overloading * unit tests for overloading
\ No newline at end of file * fixed #60
...@@ -25,3 +25,21 @@ class TestOverloading(unittest.TestCase): ...@@ -25,3 +25,21 @@ class TestOverloading(unittest.TestCase):
fun(2) fun(2)
self.assertRaises(TypeError, lambda: fun(2.5)) self.assertRaises(TypeError, lambda: fun(2.5))
fun('test') fun('test')
def test_something_2(self):
class A:
pass
class B(A):
pass
@overload
def fun(a: B):
self.assertEquals(type(a), B)
@fun.overload
def fun(a: A):
self.assertEquals(type(a), A)
fun(A())
fun(B())
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment