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
4accf45f
Kaydet (Commit)
4accf45f
authored
Kas 19, 2013
tarafından
Zachary Ware
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #19596: Set untestable tests in test_importlib to None
to avoid reporting success on empty tests.
üst
30d8e167
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
29 additions
and
55 deletions
+29
-55
test_finder.py
Lib/test/test_importlib/builtin/test_finder.py
+4
-14
test_loader.py
Lib/test/test_importlib/builtin/test_loader.py
+4
-10
test_finder.py
Lib/test/test_importlib/extension/test_finder.py
+6
-13
test_loader.py
Lib/test/test_importlib/extension/test_loader.py
+6
-9
test_finder.py
Lib/test/test_importlib/frozen/test_finder.py
+4
-6
test_loader.py
Lib/test/test_importlib/frozen/test_loader.py
+2
-3
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_importlib/builtin/test_finder.py
Dosyayı görüntüle @
4accf45f
...
@@ -16,21 +16,11 @@ class FinderTests(abc.FinderTests):
...
@@ -16,21 +16,11 @@ class FinderTests(abc.FinderTests):
found
=
machinery
.
BuiltinImporter
.
find_module
(
builtin_util
.
NAME
)
found
=
machinery
.
BuiltinImporter
.
find_module
(
builtin_util
.
NAME
)
self
.
assertTrue
(
found
)
self
.
assertTrue
(
found
)
def
test_package
(
self
):
# Built-in modules cannot be a package.
# Built-in modules cannot be a package.
test_package
=
test_package_in_package
=
test_package_over_module
=
None
pass
def
test_module_in_package
(
self
):
# Built-in modules cannot be in a package.
# Built-in modules cannobt be in a package.
test_module_in_package
=
None
pass
def
test_package_in_package
(
self
):
# Built-in modules cannot be a package.
pass
def
test_package_over_module
(
self
):
# Built-in modules cannot be a package.
pass
def
test_failure
(
self
):
def
test_failure
(
self
):
assert
'importlib'
not
in
sys
.
builtin_module_names
assert
'importlib'
not
in
sys
.
builtin_module_names
...
...
Lib/test/test_importlib/builtin/test_loader.py
Dosyayı görüntüle @
4accf45f
...
@@ -32,17 +32,11 @@ class LoaderTests(abc.LoaderTests):
...
@@ -32,17 +32,11 @@ class LoaderTests(abc.LoaderTests):
module
=
self
.
load_module
(
builtin_util
.
NAME
)
module
=
self
.
load_module
(
builtin_util
.
NAME
)
self
.
verify
(
module
)
self
.
verify
(
module
)
def
test_package
(
self
):
# Built-in modules cannot be a package.
# Built-in modules cannot be a package.
test_package
=
test_lacking_parent
=
None
pass
def
test_lacking_parent
(
self
):
# No way to force an import failure.
# Built-in modules cannot be a package.
test_state_after_failure
=
None
pass
def
test_state_after_failure
(
self
):
# Not way to force an imoprt failure.
pass
def
test_module_reuse
(
self
):
def
test_module_reuse
(
self
):
# Test that the same module is used in a reload.
# Test that the same module is used in a reload.
...
...
Lib/test/test_importlib/extension/test_finder.py
Dosyayı görüntüle @
4accf45f
...
@@ -17,21 +17,14 @@ class FinderTests(abc.FinderTests):
...
@@ -17,21 +17,14 @@ class FinderTests(abc.FinderTests):
def
test_module
(
self
):
def
test_module
(
self
):
self
.
assertTrue
(
self
.
find_module
(
util
.
NAME
))
self
.
assertTrue
(
self
.
find_module
(
util
.
NAME
))
def
test_package
(
self
):
# No extension module as an __init__ available for testing.
# No extension module as an __init__ available for testing.
test_package
=
test_package_in_package
=
None
pass
def
test_module_in_package
(
self
):
# No extension module in a package available for testing.
# No extension module in a package available for testing.
test_module_in_package
=
None
pass
def
test_package_in_package
(
self
):
# Extension modules cannot be an __init__ for a package.
# No extension module as an __init__ available for testing.
test_package_over_module
=
None
pass
def
test_package_over_module
(
self
):
# Extension modules cannot be an __init__ for a package.
pass
def
test_failure
(
self
):
def
test_failure
(
self
):
self
.
assertIsNone
(
self
.
find_module
(
'asdfjkl;'
))
self
.
assertIsNone
(
self
.
find_module
(
'asdfjkl;'
))
...
...
Lib/test/test_importlib/extension/test_loader.py
Dosyayı görüntüle @
4accf45f
...
@@ -38,13 +38,11 @@ class LoaderTests(abc.LoaderTests):
...
@@ -38,13 +38,11 @@ class LoaderTests(abc.LoaderTests):
self
.
assertIsInstance
(
module
.
__loader__
,
self
.
assertIsInstance
(
module
.
__loader__
,
machinery
.
ExtensionFileLoader
)
machinery
.
ExtensionFileLoader
)
def
test_package
(
self
):
# No extension module as __init__ available for testing.
# No extension module as __init__ available for testing.
test_package
=
None
pass
def
test_lacking_parent
(
self
):
# No extension module in a package available for testing.
# No extension module in a package available for testing.
test_lacking_parent
=
None
pass
def
test_module_reuse
(
self
):
def
test_module_reuse
(
self
):
with
util
.
uncache
(
ext_util
.
NAME
):
with
util
.
uncache
(
ext_util
.
NAME
):
...
@@ -52,9 +50,8 @@ class LoaderTests(abc.LoaderTests):
...
@@ -52,9 +50,8 @@ class LoaderTests(abc.LoaderTests):
module2
=
self
.
load_module
(
ext_util
.
NAME
)
module2
=
self
.
load_module
(
ext_util
.
NAME
)
self
.
assertIs
(
module1
,
module2
)
self
.
assertIs
(
module1
,
module2
)
def
test_state_after_failure
(
self
):
# No easy way to trigger a failure after a successful import.
# No easy way to trigger a failure after a successful import.
test_state_after_failure
=
None
pass
def
test_unloadable
(
self
):
def
test_unloadable
(
self
):
name
=
'asdfjkl;'
name
=
'asdfjkl;'
...
...
Lib/test/test_importlib/frozen/test_finder.py
Dosyayı görüntüle @
4accf45f
...
@@ -25,13 +25,11 @@ class FinderTests(abc.FinderTests):
...
@@ -25,13 +25,11 @@ class FinderTests(abc.FinderTests):
loader
=
self
.
find
(
'__phello__.spam'
,
[
'__phello__'
])
loader
=
self
.
find
(
'__phello__.spam'
,
[
'__phello__'
])
self
.
assertTrue
(
hasattr
(
loader
,
'load_module'
))
self
.
assertTrue
(
hasattr
(
loader
,
'load_module'
))
def
test_package_in_package
(
self
):
# No frozen package within another package to test with.
# No frozen package within another package to test with.
test_package_in_package
=
None
pass
def
test_package_over_module
(
self
):
# No easy way to test.
# No easy way to test.
test_package_over_module
=
None
pass
def
test_failure
(
self
):
def
test_failure
(
self
):
loader
=
self
.
find
(
'<not real>'
)
loader
=
self
.
find
(
'<not real>'
)
...
...
Lib/test/test_importlib/frozen/test_loader.py
Dosyayı görüntüle @
4accf45f
...
@@ -65,9 +65,8 @@ class LoaderTests(abc.LoaderTests):
...
@@ -65,9 +65,8 @@ class LoaderTests(abc.LoaderTests):
self
.
assertEqual
(
repr
(
module
),
self
.
assertEqual
(
repr
(
module
),
"<module '__hello__' (frozen)>"
)
"<module '__hello__' (frozen)>"
)
def
test_state_after_failure
(
self
):
# No way to trigger an error in a frozen module.
# No way to trigger an error in a frozen module.
test_state_after_failure
=
None
pass
def
test_unloadable
(
self
):
def
test_unloadable
(
self
):
assert
machinery
.
FrozenImporter
.
find_module
(
'_not_real'
)
is
None
assert
machinery
.
FrozenImporter
.
find_module
(
'_not_real'
)
is
None
...
...
Misc/NEWS
Dosyayı görüntüle @
4accf45f
...
@@ -51,6 +51,9 @@ Library
...
@@ -51,6 +51,9 @@ Library
Tests
Tests
-----
-----
- Issue #19596: Set untestable tests in test_importlib to None to avoid
reporting success on empty tests.
- Issue #19440: Clean up test_capi by removing an unnecessary __future__
- Issue #19440: Clean up test_capi by removing an unnecessary __future__
import, converting from test_main to unittest.main, and running the
import, converting from test_main to unittest.main, and running the
_testcapi module tests within a unittest TestCase.
_testcapi module tests within a unittest TestCase.
...
...
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