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
22097e4e
Kaydet (Commit)
22097e4e
authored
May 08, 2010
tarafından
Michael Foord
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue 7780. Adding a test for unittest test discovery from a dotted path.
üst
cbf54b1e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
test_discovery.py
Lib/unittest/test/test_discovery.py
+17
-0
No files found.
Lib/unittest/test/test_discovery.py
Dosyayı görüntüle @
22097e4e
...
...
@@ -341,5 +341,22 @@ class TestDiscovery(unittest.TestCase):
self
.
assertEqual
(
sys
.
path
[
0
],
full_path
)
def
test_discovery_from_dotted_path
(
self
):
loader
=
unittest
.
TestLoader
()
tests
=
[
self
]
expectedPath
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
unittest
.
test
.
__file__
))
self
.
wasRun
=
False
def
_find_tests
(
start_dir
,
pattern
):
self
.
wasRun
=
True
self
.
assertEqual
(
start_dir
,
expectedPath
)
return
tests
loader
.
_find_tests
=
_find_tests
suite
=
loader
.
discover
(
'unittest.test'
)
self
.
assertTrue
(
self
.
wasRun
)
self
.
assertEqual
(
suite
.
_tests
,
tests
)
if
__name__
==
'__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