mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
[3.6] bpo-28556: Minor updates to typing module (GH-3550) (#3558)
* Copy changes to typing from upstream repo
* Add NEWS entry
(cherry picked from commit 65bc62052f
)
This commit is contained in:
parent
ef323e8d82
commit
9e3cd78ec1
3 changed files with 38 additions and 50 deletions
|
@ -1069,6 +1069,13 @@ class GenericTests(BaseTestCase):
|
|||
for t in things + [Any]:
|
||||
self.assertEqual(t, copy(t))
|
||||
self.assertEqual(t, deepcopy(t))
|
||||
if sys.version_info >= (3, 3):
|
||||
# From copy module documentation:
|
||||
# It does "copy" functions and classes (shallow and deeply), by returning
|
||||
# the original object unchanged; this is compatible with the way these
|
||||
# are treated by the pickle module.
|
||||
self.assertTrue(t is copy(t))
|
||||
self.assertTrue(t is deepcopy(t))
|
||||
|
||||
def test_weakref_all(self):
|
||||
T = TypeVar('T')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue