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
79e4803b
Kaydet (Commit)
79e4803b
authored
May 26, 2008
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
remove test.support.have_unicode
üst
2b7411df
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
26 deletions
+12
-26
test.rst
Doc/library/test.rst
+0
-5
README
Lib/test/README
+0
-2
support.py
Lib/test/support.py
+8
-14
test_float.py
Lib/test/test_float.py
+4
-5
No files found.
Doc/library/test.rst
Dosyayı görüntüle @
79e4803b
...
@@ -221,11 +221,6 @@ The :mod:`test.test_support` module defines the following constants:
...
@@ -221,11 +221,6 @@ The :mod:`test.test_support` module defines the following constants:
:mod:`test.regrtest`.
:mod:`test.regrtest`.
.. data:: have_unicode
:const:`True` when Unicode support is available.
.. data:: is_jython
.. data:: is_jython
:const:`True` if the running interpreter is Jython.
:const:`True` if the running interpreter is Jython.
...
...
Lib/test/README
Dosyayı görüntüle @
79e4803b
...
@@ -355,8 +355,6 @@ test_support provides the following useful objects:
...
@@ -355,8 +355,6 @@ test_support provides the following useful objects:
mode, and it raises ``TestFailed`` on failure instead of
mode, and it raises ``TestFailed`` on failure instead of
``AssertionError``.
``AssertionError``.
* ``have_unicode`` - true if Unicode is available, false otherwise.
* ``is_jython`` - true if the interpreter is Jython, false otherwise.
* ``is_jython`` - true if the interpreter is Jython, false otherwise.
* ``TESTFN`` - a string that should always be used as the filename when
* ``TESTFN`` - a string that should always be used as the filename when
...
...
Lib/test/support.py
Dosyayı görüntüle @
79e4803b
...
@@ -17,14 +17,14 @@ __all__ = ["Error", "TestFailed", "TestSkipped", "ResourceDenied", "import_modul
...
@@ -17,14 +17,14 @@ __all__ = ["Error", "TestFailed", "TestSkipped", "ResourceDenied", "import_modul
"verbose"
,
"use_resources"
,
"max_memuse"
,
"record_original_stdout"
,
"verbose"
,
"use_resources"
,
"max_memuse"
,
"record_original_stdout"
,
"get_original_stdout"
,
"unload"
,
"unlink"
,
"rmtree"
,
"forget"
,
"get_original_stdout"
,
"unload"
,
"unlink"
,
"rmtree"
,
"forget"
,
"is_resource_enabled"
,
"requires"
,
"find_unused_port"
,
"bind_port"
,
"is_resource_enabled"
,
"requires"
,
"find_unused_port"
,
"bind_port"
,
"fcmp"
,
"
have_unicode"
,
"is_jython"
,
"TESTFN"
,
"HOST"
,
"FUZZ
"
,
"fcmp"
,
"
is_jython"
,
"TESTFN"
,
"HOST"
,
"FUZZ"
,
"findfile"
,
"verify
"
,
"
findfile"
,
"verify"
,
"vereq"
,
"sortdict"
,
"check_syntax_error
"
,
"
vereq"
,
"sortdict"
,
"check_syntax_error"
,
"open_urlresource
"
,
"
open_urlresource"
,
"WarningMessage"
,
"catch_warning"
,
"CleanImport
"
,
"
WarningMessage"
,
"catch_warning"
,
"CleanImport"
,
"EnvironmentVarGuard
"
,
"
EnvironmentVarGuard"
,
"TransientResource"
,
"captured_outp
ut"
,
"
TransientResource"
,
"captured_output"
,
"captured_stdo
ut"
,
"
captured_stdout"
,
"TransientResource"
,
"transient_internet
"
,
"
TransientResource"
,
"transient_internet"
,
"run_with_locale
"
,
"
run_with_locale"
,
"set_memlimit"
,
"bigmemtest"
,
"bigaddrspacetest
"
,
"
set_memlimit"
,
"bigmemtest"
,
"bigaddrspacetest"
,
"BasicTestRunner
"
,
"
BasicTestRunner"
,
"run_unittest"
,
"run_doctest"
,
"threading_set
up"
,
"
run_unittest"
,
"run_doctest"
,
"threading_setup"
,
"threading_clean
up"
,
"
threading_cleanup"
,
"
reap_children"
]
"reap_children"
]
class
Error
(
Exception
):
class
Error
(
Exception
):
"""Base class for regression test exceptions."""
"""Base class for regression test exceptions."""
...
@@ -243,12 +243,6 @@ def fcmp(x, y): # fuzzy comparison function
...
@@ -243,12 +243,6 @@ def fcmp(x, y): # fuzzy comparison function
return
(
len
(
x
)
>
len
(
y
))
-
(
len
(
x
)
<
len
(
y
))
return
(
len
(
x
)
>
len
(
y
))
-
(
len
(
x
)
<
len
(
y
))
return
(
x
>
y
)
-
(
x
<
y
)
return
(
x
>
y
)
-
(
x
<
y
)
try
:
str
have_unicode
=
True
except
NameError
:
have_unicode
=
False
is_jython
=
sys
.
platform
.
startswith
(
'java'
)
is_jython
=
sys
.
platform
.
startswith
(
'java'
)
# Filename used for testing
# Filename used for testing
...
...
Lib/test/test_float.py
Dosyayı görüntüle @
79e4803b
...
@@ -22,11 +22,10 @@ class GeneralFloatCases(unittest.TestCase):
...
@@ -22,11 +22,10 @@ class GeneralFloatCases(unittest.TestCase):
self
.
assertRaises
(
ValueError
,
float
,
"+-3.14"
)
self
.
assertRaises
(
ValueError
,
float
,
"+-3.14"
)
self
.
assertRaises
(
ValueError
,
float
,
"-+3.14"
)
self
.
assertRaises
(
ValueError
,
float
,
"-+3.14"
)
self
.
assertRaises
(
ValueError
,
float
,
"--3.14"
)
self
.
assertRaises
(
ValueError
,
float
,
"--3.14"
)
if
have_unicode
:
self
.
assertEqual
(
float
(
unicode
(
" 3.14 "
)),
3.14
)
self
.
assertEqual
(
float
(
unicode
(
" 3.14 "
)),
3.14
)
self
.
assertEqual
(
float
(
unicode
(
"
\u0663
.
\u0661\u0664
"
,
'raw-unicode-escape'
)),
3.14
)
self
.
assertEqual
(
float
(
unicode
(
"
\u0663
.
\u0661\u0664
"
,
'raw-unicode-escape'
)),
3.14
)
# Implementation limitation in PyFloat_FromString()
# Implementation limitation in PyFloat_FromString()
self
.
assertRaises
(
ValueError
,
float
,
unicode
(
"1"
*
10000
))
self
.
assertRaises
(
ValueError
,
float
,
unicode
(
"1"
*
10000
))
@support.run_with_locale
(
'LC_NUMERIC'
,
'fr_FR'
,
'de_DE'
)
@support.run_with_locale
(
'LC_NUMERIC'
,
'fr_FR'
,
'de_DE'
)
def
test_float_with_comma
(
self
):
def
test_float_with_comma
(
self
):
...
...
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