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
b1095154
Kaydet (Commit)
b1095154
authored
Haz 28, 2012
tarafından
Eric V. Smith
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use assertIsNone. Thanks Terry Reedy.
üst
591c1cca
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
11 additions
and
11 deletions
+11
-11
test_finder.py
Lib/importlib/test/builtin/test_finder.py
+2
-2
test_loader.py
Lib/importlib/test/builtin/test_loader.py
+2
-2
test_finder.py
Lib/importlib/test/extension/test_finder.py
+1
-1
test_finder.py
Lib/importlib/test/frozen/test_finder.py
+1
-1
test_loader.py
Lib/importlib/test/frozen/test_loader.py
+1
-1
test_meta_path.py
Lib/importlib/test/import_/test_meta_path.py
+1
-1
test_path.py
Lib/importlib/test/import_/test_path.py
+1
-1
test_finder.py
Lib/importlib/test/source/test_finder.py
+1
-1
test_locks.py
Lib/importlib/test/test_locks.py
+1
-1
No files found.
Lib/importlib/test/builtin/test_finder.py
Dosyayı görüntüle @
b1095154
...
...
@@ -35,14 +35,14 @@ class FinderTests(abc.FinderTests):
def
test_failure
(
self
):
assert
'importlib'
not
in
sys
.
builtin_module_names
loader
=
machinery
.
BuiltinImporter
.
find_module
(
'importlib'
)
self
.
assertIs
(
loader
,
None
)
self
.
assertIs
None
(
loader
)
def
test_ignore_path
(
self
):
# The value for 'path' should always trigger a failed import.
with
util
.
uncache
(
builtin_util
.
NAME
):
loader
=
machinery
.
BuiltinImporter
.
find_module
(
builtin_util
.
NAME
,
[
'pkg'
])
self
.
assertIs
(
loader
,
None
)
self
.
assertIs
None
(
loader
)
...
...
Lib/importlib/test/builtin/test_loader.py
Dosyayı görüntüle @
b1095154
...
...
@@ -74,12 +74,12 @@ class InspectLoaderTests(unittest.TestCase):
def
test_get_code
(
self
):
# There is no code object.
result
=
machinery
.
BuiltinImporter
.
get_code
(
builtin_util
.
NAME
)
self
.
assertIs
(
result
,
None
)
self
.
assertIs
None
(
result
)
def
test_get_source
(
self
):
# There is no source.
result
=
machinery
.
BuiltinImporter
.
get_source
(
builtin_util
.
NAME
)
self
.
assertIs
(
result
,
None
)
self
.
assertIs
None
(
result
)
def
test_is_package
(
self
):
# Cannot be a package.
...
...
Lib/importlib/test/extension/test_finder.py
Dosyayı görüntüle @
b1095154
...
...
@@ -36,7 +36,7 @@ class FinderTests(abc.FinderTests):
pass
def
test_failure
(
self
):
self
.
assertIs
(
self
.
find_module
(
'asdfjkl;'
),
None
)
self
.
assertIs
None
(
self
.
find_module
(
'asdfjkl;'
)
)
# XXX Raise an exception if someone tries to use the 'path' argument?
...
...
Lib/importlib/test/frozen/test_finder.py
Dosyayı görüntüle @
b1095154
...
...
@@ -35,7 +35,7 @@ class FinderTests(abc.FinderTests):
def
test_failure
(
self
):
loader
=
self
.
find
(
'<not real>'
)
self
.
assertIs
(
loader
,
None
)
self
.
assertIs
None
(
loader
)
def
test_main
():
...
...
Lib/importlib/test/frozen/test_loader.py
Dosyayı görüntüle @
b1095154
...
...
@@ -93,7 +93,7 @@ class InspectLoaderTests(unittest.TestCase):
def
test_get_source
(
self
):
# Should always return None.
result
=
machinery
.
FrozenImporter
.
get_source
(
'__hello__'
)
self
.
assertIs
(
result
,
None
)
self
.
assertIs
None
(
result
)
def
test_is_package
(
self
):
# Should be able to tell what is a package.
...
...
Lib/importlib/test/import_/test_meta_path.py
Dosyayı görüntüle @
b1095154
...
...
@@ -82,7 +82,7 @@ class CallSignature(unittest.TestCase):
self
.
assertEqual
(
len
(
args
),
2
)
self
.
assertEqual
(
len
(
kwargs
),
0
)
self
.
assertEqual
(
args
[
0
],
mod_name
)
self
.
assertIs
(
args
[
1
],
None
)
self
.
assertIs
None
(
args
[
1
]
)
def
test_with_path
(
self
):
# [path set]
...
...
Lib/importlib/test/import_/test_path.py
Dosyayı görüntüle @
b1095154
...
...
@@ -20,7 +20,7 @@ class FinderTests(unittest.TestCase):
# Test None returned upon not finding a suitable finder.
module
=
'<test module>'
with
util
.
import_state
():
self
.
assertIs
(
machinery
.
PathFinder
.
find_module
(
module
),
None
)
self
.
assertIs
None
(
machinery
.
PathFinder
.
find_module
(
module
)
)
def
test_sys_path
(
self
):
# Test that sys.path is used when 'path' is None.
...
...
Lib/importlib/test/source/test_finder.py
Dosyayı görüntüle @
b1095154
...
...
@@ -115,7 +115,7 @@ class FinderTests(abc.FinderTests):
def
test_failure
(
self
):
with
source_util
.
create_modules
(
'blah'
)
as
mapping
:
nothing
=
self
.
import_
(
mapping
[
'.root'
],
'sdfsadsadf'
)
self
.
assertIs
(
nothing
,
None
)
self
.
assertIs
None
(
nothing
)
def
test_empty_string_for_dir
(
self
):
# The empty string from sys.path means to search in the cwd.
...
...
Lib/importlib/test/test_locks.py
Dosyayı görüntüle @
b1095154
...
...
@@ -97,7 +97,7 @@ class LifetimeTests(unittest.TestCase):
del
lock
support
.
gc_collect
()
self
.
assertNotIn
(
name
,
_bootstrap
.
_module_locks
)
self
.
assertIs
(
wr
(),
None
)
self
.
assertIs
None
(
wr
()
)
def
test_all_locks
(
self
):
support
.
gc_collect
()
...
...
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