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
39e360b0
Kaydet (Commit)
39e360b0
authored
May 26, 2008
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix failing test from rename
üst
3d1e861d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
test_python_api.py
Lib/ctypes/test/test_python_api.py
+8
-8
No files found.
Lib/ctypes/test/test_python_api.py
Dosyayı görüntüle @
39e360b0
...
...
@@ -17,21 +17,21 @@ else:
class
PythonAPITestCase
(
unittest
.
TestCase
):
def
test_Py
String
_FromStringAndSize
(
self
):
Py
String_FromStringAndSize
=
pythonapi
.
PyString
_FromStringAndSize
def
test_Py
Bytes
_FromStringAndSize
(
self
):
Py
Bytes_FromStringAndSize
=
pythonapi
.
PyBytes
_FromStringAndSize
Py
String
_FromStringAndSize
.
restype
=
py_object
Py
String
_FromStringAndSize
.
argtypes
=
c_char_p
,
c_py_ssize_t
Py
Bytes
_FromStringAndSize
.
restype
=
py_object
Py
Bytes
_FromStringAndSize
.
argtypes
=
c_char_p
,
c_py_ssize_t
self
.
failUnlessEqual
(
Py
String
_FromStringAndSize
(
b
"abcdefghi"
,
3
),
b
"abc"
)
self
.
failUnlessEqual
(
Py
Bytes
_FromStringAndSize
(
b
"abcdefghi"
,
3
),
b
"abc"
)
def
test_PyString_FromString
(
self
):
pythonapi
.
Py
String
_FromString
.
restype
=
py_object
pythonapi
.
Py
String
_FromString
.
argtypes
=
(
c_char_p
,)
pythonapi
.
Py
Bytes
_FromString
.
restype
=
py_object
pythonapi
.
Py
Bytes
_FromString
.
argtypes
=
(
c_char_p
,)
s
=
b
"abc"
refcnt
=
grc
(
s
)
pyob
=
pythonapi
.
Py
String
_FromString
(
s
)
pyob
=
pythonapi
.
Py
Bytes
_FromString
(
s
)
self
.
failUnlessEqual
(
grc
(
s
),
refcnt
)
self
.
failUnlessEqual
(
s
,
pyob
)
del
pyob
...
...
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