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
fc4b5b9a
Kaydet (Commit)
fc4b5b9a
authored
Tem 04, 2013
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Move test_import over to unittest.main().
üst
679ecb56
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
14 deletions
+2
-14
test_import.py
Lib/test/test_import.py
+2
-14
No files found.
Lib/test/test_import.py
Dosyayı görüntüle @
fc4b5b9a
...
...
@@ -68,8 +68,6 @@ class ImportTests(unittest.TestCase):
def
tearDown
(
self
):
unload
(
TESTFN
)
setUp
=
tearDown
def
test_case_sensitivity
(
self
):
# Brief digression to test that import is case-sensitive: if we got
# this far, we know for sure that "random" exists.
...
...
@@ -487,7 +485,7 @@ func_filename = func.__code__.co_filename
header
=
f
.
read
(
12
)
code
=
marshal
.
load
(
f
)
constants
=
list
(
code
.
co_consts
)
foreign_code
=
test_main
.
__code__
foreign_code
=
importlib
.
import_module
.
__code__
pos
=
constants
.
index
(
1
)
constants
[
pos
]
=
foreign_code
code
=
type
(
code
)(
code
.
co_argcount
,
code
.
co_kwonlyargcount
,
...
...
@@ -1013,16 +1011,6 @@ class ImportTracebackTests(unittest.TestCase):
importlib
.
SourceLoader
.
load_module
=
old_load_module
def
test_main
(
verbose
=
None
):
run_unittest
(
ImportTests
,
PycacheTests
,
FilePermissionTests
,
PycRewritingTests
,
PathsTests
,
RelativeImportTests
,
OverridingImportBuiltinTests
,
ImportlibBootstrapTests
,
TestSymbolicallyLinkedPackage
,
ImportTracebackTests
)
if
__name__
==
'__main__'
:
# Test needs to be a package, so we can do relative imports.
from
test.test_import
import
test_main
test_main
()
unittest
.
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