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
a0d73a14
Kaydet (Commit)
a0d73a14
authored
Haz 21, 2019
tarafından
Joannah Nanjekye
Kaydeden (comit)
Brett Cannon
Haz 21, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-30202 : Update test.test_importlib.test_abc to test find_spec() (GH-12847)
üst
f8dd77d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
test_abc.py
Lib/test/test_importlib/test_abc.py
+17
-4
2019-04-15-19-05-35.bpo-30202.Wt7INj.rst
...EWS.d/next/Tests/2019-04-15-19-05-35.bpo-30202.Wt7INj.rst
+2
-0
No files found.
Lib/test/test_importlib/test_abc.py
100644 → 100755
Dosyayı görüntüle @
a0d73a14
...
@@ -357,13 +357,27 @@ class MetaPathFinderFindModuleTests:
...
@@ -357,13 +357,27 @@ class MetaPathFinderFindModuleTests:
return
MetaPathSpecFinder
()
return
MetaPathSpecFinder
()
def
test_
no_spec
(
self
):
def
test_
find_module
(
self
):
finder
=
self
.
finder
(
None
)
finder
=
self
.
finder
(
None
)
path
=
[
'a'
,
'b'
,
'c'
]
path
=
[
'a'
,
'b'
,
'c'
]
name
=
'blah'
name
=
'blah'
with
self
.
assertWarns
(
DeprecationWarning
):
with
self
.
assertWarns
(
DeprecationWarning
):
found
=
finder
.
find_module
(
name
,
path
)
found
=
finder
.
find_module
(
name
,
path
)
self
.
assertIsNone
(
found
)
self
.
assertIsNone
(
found
)
def
test_find_spec_with_explicit_target
(
self
):
loader
=
object
()
spec
=
self
.
util
.
spec_from_loader
(
'blah'
,
loader
)
finder
=
self
.
finder
(
spec
)
found
=
finder
.
find_spec
(
'blah'
,
'blah'
,
None
)
self
.
assertEqual
(
found
,
spec
)
def
test_no_spec
(
self
):
finder
=
self
.
finder
(
None
)
path
=
[
'a'
,
'b'
,
'c'
]
name
=
'blah'
found
=
finder
.
find_spec
(
name
,
path
,
None
)
self
.
assertIsNone
(
found
)
self
.
assertEqual
(
name
,
finder
.
called_for
[
0
])
self
.
assertEqual
(
name
,
finder
.
called_for
[
0
])
self
.
assertEqual
(
path
,
finder
.
called_for
[
1
])
self
.
assertEqual
(
path
,
finder
.
called_for
[
1
])
...
@@ -371,9 +385,8 @@ class MetaPathFinderFindModuleTests:
...
@@ -371,9 +385,8 @@ class MetaPathFinderFindModuleTests:
loader
=
object
()
loader
=
object
()
spec
=
self
.
util
.
spec_from_loader
(
'blah'
,
loader
)
spec
=
self
.
util
.
spec_from_loader
(
'blah'
,
loader
)
finder
=
self
.
finder
(
spec
)
finder
=
self
.
finder
(
spec
)
with
self
.
assertWarns
(
DeprecationWarning
):
found
=
finder
.
find_spec
(
'blah'
,
None
)
found
=
finder
.
find_module
(
'blah'
,
None
)
self
.
assertIs
(
found
,
spec
)
self
.
assertIs
(
found
,
spec
.
loader
)
(
Frozen_MPFFindModuleTests
,
(
Frozen_MPFFindModuleTests
,
...
...
Misc/NEWS.d/next/Tests/2019-04-15-19-05-35.bpo-30202.Wt7INj.rst
0 → 100644
Dosyayı görüntüle @
a0d73a14
Update ``test.test_importlib.test_abc`` to test ``find_spec()``.
\ No newline at end of file
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