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
ce4a9c90
Kaydet (Commit)
ce4a9c90
authored
Nis 09, 2006
tarafından
Neal Norwitz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix tests so they pass in -R mode
üst
aa34b6c2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
7 deletions
+18
-7
test_decimal.py
Lib/test/test_decimal.py
+8
-5
test_difflib.py
Lib/test/test_difflib.py
+6
-2
test_warnings.py
Lib/test/test_warnings.py
+4
-0
No files found.
Lib/test/test_decimal.py
Dosyayı görüntüle @
ce4a9c90
...
@@ -42,11 +42,13 @@ Signals = getcontext().flags.keys()
...
@@ -42,11 +42,13 @@ Signals = getcontext().flags.keys()
# Tests are built around these assumed context defaults.
# Tests are built around these assumed context defaults.
# test_main() restores the original context.
# test_main() restores the original context.
ORIGINAL_CONTEXT
=
getcontext
()
.
copy
()
def
init
():
DefaultContext
.
prec
=
9
global
ORIGINAL_CONTEXT
DefaultContext
.
rounding
=
ROUND_HALF_EVEN
ORIGINAL_CONTEXT
=
getcontext
()
.
copy
()
DefaultContext
.
traps
=
dict
.
fromkeys
(
Signals
,
0
)
DefaultContext
.
prec
=
9
setcontext
(
DefaultContext
)
DefaultContext
.
rounding
=
ROUND_HALF_EVEN
DefaultContext
.
traps
=
dict
.
fromkeys
(
Signals
,
0
)
setcontext
(
DefaultContext
)
TESTDATADIR
=
'decimaltestdata'
TESTDATADIR
=
'decimaltestdata'
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
@@ -1069,6 +1071,7 @@ def test_main(arith=False, verbose=None):
...
@@ -1069,6 +1071,7 @@ def test_main(arith=False, verbose=None):
is enabled in regrtest.py
is enabled in regrtest.py
"""
"""
init
()
global
TEST_ALL
global
TEST_ALL
TEST_ALL
=
arith
or
is_resource_enabled
(
'decimal'
)
TEST_ALL
=
arith
or
is_resource_enabled
(
'decimal'
)
...
...
Lib/test/test_difflib.py
Dosyayı görüntüle @
ce4a9c90
...
@@ -152,6 +152,10 @@ class TestSFpatches(unittest.TestCase):
...
@@ -152,6 +152,10 @@ class TestSFpatches(unittest.TestCase):
difflib
.
SequenceMatcher
(
None
,
old
,
new
)
.
get_opcodes
()
difflib
.
SequenceMatcher
(
None
,
old
,
new
)
.
get_opcodes
()
Doctests
=
doctest
.
DocTestSuite
(
difflib
)
def
test_main
():
difflib
.
HtmlDiff
.
_default_prefix
=
0
Doctests
=
doctest
.
DocTestSuite
(
difflib
)
run_unittest
(
TestSFpatches
,
TestSFbugs
,
Doctests
)
run_unittest
(
TestSFpatches
,
TestSFbugs
,
Doctests
)
if
__name__
==
'__main__'
:
test_main
()
Lib/test/test_warnings.py
Dosyayı görüntüle @
ce4a9c90
...
@@ -84,5 +84,9 @@ class TestModule(unittest.TestCase):
...
@@ -84,5 +84,9 @@ class TestModule(unittest.TestCase):
def
test_main
(
verbose
=
None
):
def
test_main
(
verbose
=
None
):
test_support
.
run_unittest
(
TestModule
)
test_support
.
run_unittest
(
TestModule
)
# Obscure hack so that this test passes after reloads (regrtest -R).
if
'__warningregistry__'
in
globals
():
del
globals
()[
'__warningregistry__'
]
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
test_main
(
verbose
=
True
)
test_main
(
verbose
=
True
)
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