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
d392506c
Kaydet (Commit)
d392506c
authored
Nis 16, 2002
tarafından
Tim Peters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Tighten up some warning filters, and break some dependencies on the
order in which the tests are normally run.
üst
50ac30ee
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
34 additions
and
16 deletions
+34
-16
test___all__.py
Lib/test/test___all__.py
+6
-3
test_coercion.py
Lib/test/test_coercion.py
+2
-1
test_exceptions.py
Lib/test/test_exceptions.py
+6
-2
test_os.py
Lib/test/test_os.py
+2
-2
test_regex.py
Lib/test/test_regex.py
+1
-1
test_repr.py
Lib/test/test_repr.py
+7
-3
test_strop.py
Lib/test/test_strop.py
+3
-2
test_sundry.py
Lib/test/test_sundry.py
+6
-1
test_xmllib.py
Lib/test/test_xmllib.py
+1
-1
No files found.
Lib/test/test___all__.py
Dosyayı görüntüle @
d392506c
...
...
@@ -2,9 +2,12 @@ from test_support import verify, verbose
import
sys
import
warnings
warnings
.
filterwarnings
(
"ignore"
,
".* 'pre' .*"
,
DeprecationWarning
)
warnings
.
filterwarnings
(
"ignore"
,
".* regsub .*"
,
DeprecationWarning
)
warnings
.
filterwarnings
(
"ignore"
,
".* statcache .*"
,
DeprecationWarning
)
warnings
.
filterwarnings
(
"ignore"
,
".* 'pre' .*"
,
DeprecationWarning
,
r'pre$'
)
warnings
.
filterwarnings
(
"ignore"
,
".* regsub .*"
,
DeprecationWarning
,
r'^regsub$'
)
warnings
.
filterwarnings
(
"ignore"
,
".* statcache .*"
,
DeprecationWarning
,
r'statcache$'
)
def
check_all
(
modname
):
names
=
{}
...
...
Lib/test/test_coercion.py
Dosyayı görüntüle @
d392506c
...
...
@@ -112,6 +112,7 @@ def do_prefix_binops():
warnings
.
filterwarnings
(
"ignore"
,
r'complex divmod\(\), // and
%
are deprecated'
,
DeprecationWarning
)
DeprecationWarning
,
r'test_coercion$'
)
do_infix_binops
()
do_prefix_binops
()
Lib/test/test_exceptions.py
Dosyayı görüntüle @
d392506c
...
...
@@ -5,8 +5,6 @@ from types import ClassType
import
warnings
import
sys
,
traceback
warnings
.
filterwarnings
(
"error"
,
""
,
OverflowWarning
,
__name__
)
print
'5. Built-in exceptions'
# XXX This is not really enough, each *operation* should be tested!
...
...
@@ -86,6 +84,12 @@ try: x = undefined_variable
except
NameError
:
pass
r
(
OverflowError
)
# XXX
# Obscure: this test relies on int+int raising OverflowError if the
# ints are big enough. But ints no longer do that by default. This
# test will have to go away someday. For now, we can convert the
# transitional OverflowWarning into an error.
warnings
.
filterwarnings
(
"error"
,
""
,
OverflowWarning
,
__name__
)
x
=
1
try
:
while
1
:
x
=
x
+
x
...
...
Lib/test/test_os.py
Dosyayı görüntüle @
d392506c
...
...
@@ -33,7 +33,7 @@ class TemporaryFileTests(unittest.TestCase):
if
not
hasattr
(
os
,
"tempnam"
):
return
warnings
.
filterwarnings
(
"ignore"
,
"tempnam"
,
RuntimeWarning
,
"test_os
"
)
r"test_os$
"
)
self
.
check_tempfile
(
os
.
tempnam
())
name
=
os
.
tempnam
(
TESTFN
)
...
...
@@ -57,7 +57,7 @@ class TemporaryFileTests(unittest.TestCase):
if
not
hasattr
(
os
,
"tmpnam"
):
return
warnings
.
filterwarnings
(
"ignore"
,
"tmpnam"
,
RuntimeWarning
,
"test_os
"
)
r"test_os$
"
)
self
.
check_tempfile
(
os
.
tmpnam
())
# Test attributes on return values from os.*stat* family.
...
...
Lib/test/test_regex.py
Dosyayı görüntüle @
d392506c
from
test_support
import
verbose
,
sortdict
import
warnings
warnings
.
filterwarnings
(
"ignore"
,
"the regex module is deprecated"
,
DeprecationWarning
,
__name__
)
DeprecationWarning
,
r'test_regex$'
)
import
regex
from
regex_syntax
import
*
...
...
Lib/test/test_repr.py
Dosyayı görüntüle @
d392506c
...
...
@@ -105,14 +105,18 @@ class ReprTests(unittest.TestCase):
'<built-in method split of str object at 0x'
))
def
test_xrange
(
self
):
import
warnings
eq
=
self
.
assertEquals
eq
(
repr
(
xrange
(
1
)),
'xrange(1)'
)
eq
(
repr
(
xrange
(
1
,
2
)),
'xrange(1, 2)'
)
eq
(
repr
(
xrange
(
1
,
2
,
3
)),
'xrange(1, 4, 3)'
)
# Turn off warnings for deprecated multiplication
import
warnings
warnings
.
filterwarnings
(
'ignore'
,
category
=
DeprecationWarning
,
module
=
ReprTests
.
__module__
)
warnings
.
filterwarnings
(
'ignore'
,
r'xrange object multiplication is deprecated'
,
DeprecationWarning
,
module
=
ReprTests
.
__module__
)
warnings
.
filterwarnings
(
'ignore'
,
r"PyRange_New's 'repetitions' argument is deprecated"
,
DeprecationWarning
,
module
=
ReprTests
.
__module__
)
eq
(
repr
(
xrange
(
1
)
*
3
),
'(xrange(1) * 3)'
)
def
test_nesting
(
self
):
...
...
Lib/test/test_strop.py
Dosyayı görüntüle @
d392506c
import
warnings
warnings
.
filterwarnings
(
"ignore"
,
""
,
DeprecationWarning
,
__name__
)
warnings
.
filterwarnings
(
"ignore"
,
""
,
DeprecationWarning
,
"unittest"
)
warnings
.
filterwarnings
(
"ignore"
,
"strop functions are obsolete;"
,
DeprecationWarning
,
r'test_strop|unittest'
)
import
strop
import
test_support
import
unittest
...
...
Lib/test/test_sundry.py
Dosyayı görüntüle @
d392506c
"""Do a minimal test of all the modules that aren't otherwise tested."""
import
warnings
warnings
.
filterwarnings
(
'ignore'
,
''
,
DeprecationWarning
,
'posixfile'
)
warnings
.
filterwarnings
(
'ignore'
,
r".*posixfile module"
,
DeprecationWarning
,
'posixfile$'
)
warnings
.
filterwarnings
(
'ignore'
,
r".*statcache module"
,
DeprecationWarning
,
'statcache$'
)
warnings
.
filterwarnings
(
'ignore'
,
r".*'re' module"
,
DeprecationWarning
,
'pre$'
)
from
test_support
import
verbose
...
...
Lib/test/test_xmllib.py
Dosyayı görüntüle @
d392506c
...
...
@@ -15,7 +15,7 @@ testdoc = """\
import
warnings
warnings
.
filterwarnings
(
"ignore"
,
".* xmllib .* obsolete.*"
,
DeprecationWarning
)
DeprecationWarning
,
r'xmllib$'
)
import
test_support
import
unittest
...
...
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