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
7c7efe90
Kaydet (Commit)
7c7efe90
authored
Agu 23, 2002
tarafından
Tim Peters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Got rid of the toy _Set class, in favor of sets.Set.
üst
b81b252f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
33 deletions
+6
-33
regrtest.py
Lib/test/regrtest.py
+6
-33
No files found.
Lib/test/regrtest.py
Dosyayı görüntüle @
7c7efe90
...
@@ -64,6 +64,7 @@ import traceback
...
@@ -64,6 +64,7 @@ import traceback
import
random
import
random
import
StringIO
import
StringIO
import
warnings
import
warnings
from
sets
import
Set
# I see no other way to suppress these warnings;
# I see no other way to suppress these warnings;
# putting them in test_grammar.py has no effect:
# putting them in test_grammar.py has no effect:
...
@@ -262,7 +263,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0,
...
@@ -262,7 +263,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0,
e
=
_ExpectedSkips
()
e
=
_ExpectedSkips
()
plat
=
sys
.
platform
plat
=
sys
.
platform
if
e
.
isvalid
():
if
e
.
isvalid
():
surprise
=
_
Set
(
skipped
)
-
e
.
getexpected
()
surprise
=
Set
(
skipped
)
-
e
.
getexpected
()
if
surprise
:
if
surprise
:
print
count
(
len
(
surprise
),
"skip"
),
\
print
count
(
len
(
surprise
),
"skip"
),
\
"unexpected on"
,
plat
+
":"
"unexpected on"
,
plat
+
":"
...
@@ -468,7 +469,7 @@ def count(n, word):
...
@@ -468,7 +469,7 @@ def count(n, word):
return
"
%
d
%
ss"
%
(
n
,
word
)
return
"
%
d
%
ss"
%
(
n
,
word
)
def
printlist
(
x
,
width
=
70
,
indent
=
4
):
def
printlist
(
x
,
width
=
70
,
indent
=
4
):
"""Print the elements of
a sequence
to stdout.
"""Print the elements of
iterable x
to stdout.
Optional arg width (default 70) is the maximum line length.
Optional arg width (default 70) is the maximum line length.
Optional arg indent (default 4) is the number of blanks with which to
Optional arg indent (default 4) is the number of blanks with which to
...
@@ -480,34 +481,6 @@ def printlist(x, width=70, indent=4):
...
@@ -480,34 +481,6 @@ def printlist(x, width=70, indent=4):
print
fill
(
' '
.
join
(
map
(
str
,
x
)),
width
,
print
fill
(
' '
.
join
(
map
(
str
,
x
)),
width
,
initial_indent
=
blanks
,
subsequent_indent
=
blanks
)
initial_indent
=
blanks
,
subsequent_indent
=
blanks
)
class
_Set
:
def
__init__
(
self
,
seq
=
[]):
data
=
self
.
data
=
{}
for
x
in
seq
:
data
[
x
]
=
1
def
__len__
(
self
):
return
len
(
self
.
data
)
def
__sub__
(
self
,
other
):
"Return set of all elements in self not in other."
result
=
_Set
()
data
=
result
.
data
=
self
.
data
.
copy
()
for
x
in
other
.
data
:
if
x
in
data
:
del
data
[
x
]
return
result
def
__iter__
(
self
):
return
iter
(
self
.
data
)
def
tolist
(
self
,
sorted
=
1
):
"Return _Set elements as a list."
data
=
self
.
data
.
keys
()
if
sorted
:
data
.
sort
()
return
data
# Map sys.platform to a string containing the basenames of tests
# Map sys.platform to a string containing the basenames of tests
# expected to be skipped on that platform.
# expected to be skipped on that platform.
...
@@ -776,11 +749,11 @@ _expectations = {
...
@@ -776,11 +749,11 @@ _expectations = {
class
_ExpectedSkips
:
class
_ExpectedSkips
:
def
__init__
(
self
):
def
__init__
(
self
):
self
.
valid
=
0
self
.
valid
=
False
if
sys
.
platform
in
_expectations
:
if
sys
.
platform
in
_expectations
:
s
=
_expectations
[
sys
.
platform
]
s
=
_expectations
[
sys
.
platform
]
self
.
expected
=
_
Set
(
s
.
split
())
self
.
expected
=
Set
(
s
.
split
())
self
.
valid
=
1
self
.
valid
=
True
def
isvalid
(
self
):
def
isvalid
(
self
):
"Return true iff _ExpectedSkips knows about the current platform."
"Return true iff _ExpectedSkips knows about the current platform."
...
...
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