Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
6aafbd43
Kaydet (Commit)
6aafbd43
authored
Nis 18, 2016
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Sync test_typing.py with upstream git repo (typing.py was already synced).
üst
6a7b3a77
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
test_typing.py
Lib/test/test_typing.py
+20
-0
No files found.
Lib/test/test_typing.py
Dosyayı görüntüle @
6aafbd43
import
contextlib
import
pickle
import
re
import
sys
...
...
@@ -1309,6 +1310,21 @@ class CollectionsAbcTests(TestCase):
assert
len
(
MMB
[
KT
,
VT
]())
==
0
class
OtherABCTests
(
TestCase
):
@skipUnless
(
hasattr
(
typing
,
'ContextManager'
),
'requires typing.ContextManager'
)
def
test_contextmanager
(
self
):
@contextlib.contextmanager
def
manager
():
yield
42
cm
=
manager
()
assert
isinstance
(
cm
,
typing
.
ContextManager
)
assert
isinstance
(
cm
,
typing
.
ContextManager
[
int
])
assert
not
isinstance
(
42
,
typing
.
ContextManager
)
class
NamedTupleTests
(
TestCase
):
def
test_basics
(
self
):
...
...
@@ -1447,12 +1463,16 @@ class AllTests(TestCase):
assert
'ValuesView'
in
a
assert
'cast'
in
a
assert
'overload'
in
a
if
hasattr
(
contextlib
,
'AbstractContextManager'
):
assert
'ContextManager'
in
a
# Check that io and re are not exported.
assert
'io'
not
in
a
assert
're'
not
in
a
# Spot-check that stdlib modules aren't exported.
assert
'os'
not
in
a
assert
'sys'
not
in
a
# Check that Text is defined.
assert
'Text'
in
a
if
__name__
==
'__main__'
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment