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
082f177c
Kaydet (Commit)
082f177c
authored
Şub 17, 2012
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix importlib.test.__main__ to only worry about command-line flags when directly executed.
üst
f2e86751
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
__main__.py
Lib/importlib/test/__main__.py
+9
-8
No files found.
Lib/importlib/test/__main__.py
Dosyayı görüntüle @
082f177c
...
@@ -4,7 +4,6 @@ Specifying the ``--builtin`` flag will run tests, where applicable, with
...
@@ -4,7 +4,6 @@ Specifying the ``--builtin`` flag will run tests, where applicable, with
builtins.__import__ instead of importlib.__import__.
builtins.__import__ instead of importlib.__import__.
"""
"""
import
argparse
from
importlib.test.import_
import
util
from
importlib.test.import_
import
util
import
os.path
import
os.path
from
test.support
import
run_unittest
from
test.support
import
run_unittest
...
@@ -12,13 +11,6 @@ import unittest
...
@@ -12,13 +11,6 @@ import unittest
def
test_main
():
def
test_main
():
parser
=
argparse
.
ArgumentParser
(
description
=
'Execute the importlib test '
'suite'
)
parser
.
add_argument
(
'-b'
,
'--builtin'
,
action
=
'store_true'
,
default
=
False
,
help
=
'use builtins.__import__() instead of importlib'
)
args
=
parser
.
parse_args
()
if
args
.
builtin
:
util
.
using___import__
=
True
start_dir
=
os
.
path
.
dirname
(
__file__
)
start_dir
=
os
.
path
.
dirname
(
__file__
)
top_dir
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
start_dir
))
top_dir
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
start_dir
))
test_loader
=
unittest
.
TestLoader
()
test_loader
=
unittest
.
TestLoader
()
...
@@ -26,4 +18,13 @@ def test_main():
...
@@ -26,4 +18,13 @@ def test_main():
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
import
argparse
parser
=
argparse
.
ArgumentParser
(
description
=
'Execute the importlib test '
'suite'
)
parser
.
add_argument
(
'-b'
,
'--builtin'
,
action
=
'store_true'
,
default
=
False
,
help
=
'use builtins.__import__() instead of importlib'
)
args
=
parser
.
parse_args
()
if
args
.
builtin
:
util
.
using___import__
=
True
test_main
()
test_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