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
0877060f
Kaydet (Commit)
0877060f
authored
Şub 06, 2010
tarafından
Michael Foord
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
unittest.TestLoader creates a TestSuite before calling load_tests. Issue 7799.
üst
23739269
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
test_unittest.py
Lib/test/test_unittest.py
+2
-0
loader.py
Lib/unittest/loader.py
+2
-1
No files found.
Lib/test/test_unittest.py
Dosyayı görüntüle @
0877060f
...
@@ -272,12 +272,14 @@ class Test_TestLoader(TestCase):
...
@@ -272,12 +272,14 @@ class Test_TestLoader(TestCase):
load_tests_args
=
[]
load_tests_args
=
[]
def
load_tests
(
loader
,
tests
,
pattern
):
def
load_tests
(
loader
,
tests
,
pattern
):
self
.
assertIsInstance
(
tests
,
unittest
.
TestSuite
)
load_tests_args
.
extend
((
loader
,
tests
,
pattern
))
load_tests_args
.
extend
((
loader
,
tests
,
pattern
))
return
tests
return
tests
m
.
load_tests
=
load_tests
m
.
load_tests
=
load_tests
loader
=
unittest
.
TestLoader
()
loader
=
unittest
.
TestLoader
()
suite
=
loader
.
loadTestsFromModule
(
m
)
suite
=
loader
.
loadTestsFromModule
(
m
)
self
.
assertIsInstance
(
suite
,
unittest
.
TestSuite
)
self
.
assertEquals
(
load_tests_args
,
[
loader
,
suite
,
None
])
self
.
assertEquals
(
load_tests_args
,
[
loader
,
suite
,
None
])
load_tests_args
=
[]
load_tests_args
=
[]
...
...
Lib/unittest/loader.py
Dosyayı görüntüle @
0877060f
...
@@ -71,9 +71,10 @@ class TestLoader(object):
...
@@ -71,9 +71,10 @@ class TestLoader(object):
tests
.
append
(
self
.
loadTestsFromTestCase
(
obj
))
tests
.
append
(
self
.
loadTestsFromTestCase
(
obj
))
load_tests
=
getattr
(
module
,
'load_tests'
,
None
)
load_tests
=
getattr
(
module
,
'load_tests'
,
None
)
tests
=
self
.
suiteClass
(
tests
)
if
use_load_tests
and
load_tests
is
not
None
:
if
use_load_tests
and
load_tests
is
not
None
:
return
load_tests
(
self
,
tests
,
None
)
return
load_tests
(
self
,
tests
,
None
)
return
self
.
suiteClass
(
tests
)
return
tests
def
loadTestsFromName
(
self
,
name
,
module
=
None
):
def
loadTestsFromName
(
self
,
name
,
module
=
None
):
"""Return a suite of all tests cases given a string specifier.
"""Return a suite of all tests cases given a string specifier.
...
...
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