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
27e02402
Kaydet (Commit)
27e02402
authored
Mar 24, 2010
tarafından
Florent Xicluna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Skip test_ascii_formatd if _ctypes is not available (BSD, ...).
Previous change was incomplete (r79334).
üst
a3c39c0f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
14 deletions
+9
-14
regrtest.py
Lib/test/regrtest.py
+2
-0
test_ascii_formatd.py
Lib/test/test_ascii_formatd.py
+7
-14
No files found.
Lib/test/regrtest.py
Dosyayı görüntüle @
27e02402
...
...
@@ -1406,6 +1406,7 @@ _expectations = {
"""
,
'openbsd3'
:
"""
test_ascii_formatd
test_bsddb
test_bsddb3
test_ctypes
...
...
@@ -1424,6 +1425,7 @@ _expectations = {
"""
,
'netbsd3'
:
"""
test_ascii_formatd
test_bsddb
test_bsddb185
test_bsddb3
...
...
Lib/test/test_ascii_formatd.py
Dosyayı görüntüle @
27e02402
...
...
@@ -3,20 +3,18 @@
# Test that it works, and test that it's deprecated.
import
unittest
from
test.test_support
import
(
check_warnings
,
run_unittest
,
cpython_only
,
import_module
)
from
test.test_support
import
check_warnings
,
run_unittest
,
import_module
# Skip tests if _ctypes module does not exist
import_module
(
'_ctypes'
)
from
ctypes
import
pythonapi
,
create_string_buffer
,
sizeof
,
byref
,
c_double
PyOS_ascii_formatd
=
pythonapi
.
PyOS_ascii_formatd
class
FormatDeprecationTests
(
unittest
.
TestCase
):
@cpython_only
def
test_format_deprecation
(
self
):
# skip if _ctypes is not available
import_module
(
'_ctypes'
)
# delay importing ctypes until we know we're in CPython
from
ctypes
import
(
pythonapi
,
create_string_buffer
,
sizeof
,
byref
,
c_double
)
PyOS_ascii_formatd
=
pythonapi
.
PyOS_ascii_formatd
buf
=
create_string_buffer
(
' '
*
100
)
with
check_warnings
((
'PyOS_ascii_formatd is deprecated'
,
...
...
@@ -29,12 +27,7 @@ class FormatDeprecationTests(unittest.TestCase):
class
FormatTests
(
unittest
.
TestCase
):
# ensure that, for the restricted set of format codes,
# %-formatting returns the same values os PyOS_ascii_formatd
@cpython_only
def
test_format
(
self
):
# delay importing ctypes until we know we're in CPython
from
ctypes
import
(
pythonapi
,
create_string_buffer
,
sizeof
,
byref
,
c_double
)
PyOS_ascii_formatd
=
pythonapi
.
PyOS_ascii_formatd
buf
=
create_string_buffer
(
' '
*
100
)
tests
=
[
...
...
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