Skip to content

Commit

Permalink
shutil: Introduce duck type declaration for mock
Browse files Browse the repository at this point in the history
  • Loading branch information
JukkaL committed Sep 27, 2013
1 parent a0baa65 commit 2bd3630
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib-python/3.2/test/test_shutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
from test.support import check_warnings, captured_stdout

from typing import (
Any, Function, Tuple, List, Sequence, BinaryIO, overload, Traceback
Any, Function, Tuple, List, Sequence, BinaryIO, overload, Traceback, IO,
ducktype
)

import bz2
Expand Down Expand Up @@ -853,6 +854,7 @@ class TestCopyFile(unittest.TestCase):

_delete = False

@ducktype(IO[str])
class Faux(object):
_entered = False
_exited_with = None # type: tuple
Expand Down

0 comments on commit 2bd3630

Please sign in to comment.