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
7351f9e5
Kaydet (Commit)
7351f9e5
authored
Eki 27, 2017
tarafından
Serhiy Storchaka
Kaydeden (comit)
GitHub
Eki 27, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-31174: Improve the code of test_tools.test_unparse. (#4146)
üst
03eb11f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
test_unparse.py
Lib/test/test_tools/test_unparse.py
+8
-8
No files found.
Lib/test/test_tools/test_unparse.py
Dosyayı görüntüle @
7351f9e5
...
...
@@ -268,12 +268,13 @@ class DirectoryTestCase(ASTTestCase):
# test directories, relative to the root of the distribution
test_directories
=
'Lib'
,
os
.
path
.
join
(
'Lib'
,
'test'
)
def
get_names
(
self
):
if
DirectoryTestCase
.
NAMES
is
not
None
:
return
DirectoryTestCase
.
NAMES
@classmethod
def
get_names
(
cls
):
if
cls
.
NAMES
is
not
None
:
return
cls
.
NAMES
names
=
[]
for
d
in
self
.
test_directories
:
for
d
in
cls
.
test_directories
:
test_dir
=
os
.
path
.
join
(
basepath
,
d
)
for
n
in
os
.
listdir
(
test_dir
):
if
n
.
endswith
(
'.py'
)
and
not
n
.
startswith
(
'bad'
):
...
...
@@ -282,10 +283,9 @@ class DirectoryTestCase(ASTTestCase):
# Test limited subset of files unless the 'cpu' resource is specified.
if
not
test
.
support
.
is_resource_enabled
(
"cpu"
):
names
=
random
.
sample
(
names
,
10
)
# bpo-31174: Store the names sample to always test the same files.
# It prevents false alarms when hunting reference leaks.
DirectoryTestCase
.
NAMES
=
names
# bpo-31174: Store the names sample to always test the same files.
# It prevents false alarms when hunting reference leaks.
cls
.
NAMES
=
names
return
names
def
test_files
(
self
):
...
...
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