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
b12cb6a5
Kaydet (Commit)
b12cb6a5
authored
Ara 08, 2013
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #19535: Fixed test_docxmlrpc, test_functools, test_inspect, and
test_statistics when python is run with -OO.
üst
ca616a27
3e60a9d6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
4 deletions
+14
-4
test_docxmlrpc.py
Lib/test/test_docxmlrpc.py
+4
-2
test_functools.py
Lib/test/test_functools.py
+2
-1
test_inspect.py
Lib/test/test_inspect.py
+2
-1
test_statistics.py
Lib/test/test_statistics.py
+3
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_docxmlrpc.py
Dosyayı görüntüle @
b12cb6a5
...
@@ -202,10 +202,12 @@ class DocXMLRPCHTTPGETServer(unittest.TestCase):
...
@@ -202,10 +202,12 @@ class DocXMLRPCHTTPGETServer(unittest.TestCase):
""" Test that annotations works as expected """
""" Test that annotations works as expected """
self
.
client
.
request
(
"GET"
,
"/"
)
self
.
client
.
request
(
"GET"
,
"/"
)
response
=
self
.
client
.
getresponse
()
response
=
self
.
client
.
getresponse
()
docstring
=
(
b
''
if
sys
.
flags
.
optimize
>=
2
else
b
'<dd><tt>Use function annotations.</tt></dd>'
)
self
.
assertIn
(
self
.
assertIn
(
(
b
'<dl><dt><a name="-annotation"><strong>annotation</strong></a>'
(
b
'<dl><dt><a name="-annotation"><strong>annotation</strong></a>'
b
'(x: int)</dt>
<dd><tt>Use function annotations.</tt>
'
b
'(x: int)</dt>
'
+
docstring
+
b
'</dl>
\n
'
b
'<
/dd></dl>
\n
<
dl><dt><a name="-method_annotation"><strong>'
b
'<dl><dt><a name="-method_annotation"><strong>'
b
'method_annotation</strong></a>(x: bytes)</dt></dl>'
),
b
'method_annotation</strong></a>(x: bytes)</dt></dl>'
),
response
.
read
())
response
.
read
())
...
...
Lib/test/test_functools.py
Dosyayı görüntüle @
b12cb6a5
...
@@ -1126,7 +1126,8 @@ class TestSingleDispatch(unittest.TestCase):
...
@@ -1126,7 +1126,8 @@ class TestSingleDispatch(unittest.TestCase):
"Simple test"
"Simple test"
return
"Test"
return
"Test"
self
.
assertEqual
(
g
.
__name__
,
"g"
)
self
.
assertEqual
(
g
.
__name__
,
"g"
)
self
.
assertEqual
(
g
.
__doc__
,
"Simple test"
)
if
sys
.
flags
.
optimize
<
2
:
self
.
assertEqual
(
g
.
__doc__
,
"Simple test"
)
@unittest.skipUnless
(
decimal
,
'requires _decimal'
)
@unittest.skipUnless
(
decimal
,
'requires _decimal'
)
@support.cpython_only
@support.cpython_only
...
...
Lib/test/test_inspect.py
Dosyayı görüntüle @
b12cb6a5
...
@@ -2529,7 +2529,8 @@ class TestMain(unittest.TestCase):
...
@@ -2529,7 +2529,8 @@ class TestMain(unittest.TestCase):
# Just a quick sanity check on the output
# Just a quick sanity check on the output
self
.
assertIn
(
module
.
__name__
,
output
)
self
.
assertIn
(
module
.
__name__
,
output
)
self
.
assertIn
(
module
.
__file__
,
output
)
self
.
assertIn
(
module
.
__file__
,
output
)
self
.
assertIn
(
module
.
__cached__
,
output
)
if
not
sys
.
flags
.
optimize
:
self
.
assertIn
(
module
.
__cached__
,
output
)
self
.
assertEqual
(
err
,
b
''
)
self
.
assertEqual
(
err
,
b
''
)
...
...
Lib/test/test_statistics.py
Dosyayı görüntüle @
b12cb6a5
...
@@ -8,6 +8,7 @@ import decimal
...
@@ -8,6 +8,7 @@ import decimal
import
doctest
import
doctest
import
math
import
math
import
random
import
random
import
sys
import
types
import
types
import
unittest
import
unittest
...
@@ -625,6 +626,8 @@ class GlobalsTest(unittest.TestCase):
...
@@ -625,6 +626,8 @@ class GlobalsTest(unittest.TestCase):
class
DocTests
(
unittest
.
TestCase
):
class
DocTests
(
unittest
.
TestCase
):
@unittest.skipIf
(
sys
.
flags
.
optimize
>=
2
,
"Docstrings are omitted with -OO and above"
)
def
test_doc_tests
(
self
):
def
test_doc_tests
(
self
):
failed
,
tried
=
doctest
.
testmod
(
statistics
)
failed
,
tried
=
doctest
.
testmod
(
statistics
)
self
.
assertGreater
(
tried
,
0
)
self
.
assertGreater
(
tried
,
0
)
...
...
Misc/NEWS
Dosyayı görüntüle @
b12cb6a5
...
@@ -112,6 +112,9 @@ Library
...
@@ -112,6 +112,9 @@ Library
Tests
Tests
-----
-----
- Issue #19535: Fixed test_docxmlrpc, test_functools, test_inspect, and
test_statistics when python is run with -OO.
- Issue #19926: Removed unneeded test_main from test_abstract_numbers.
- Issue #19926: Removed unneeded test_main from test_abstract_numbers.
Patch by Vajrasky Kok.
Patch by Vajrasky Kok.
...
...
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